29 #ifndef JUCE_CHARPOINTER_UTF32_H_INCLUDED 30 #define JUCE_CHARPOINTER_UTF32_H_INCLUDED 45 : data (const_cast <CharType*> (rawPointer))
62 data = const_cast <CharType*> (text);
78 inline operator const CharType*()
const noexcept {
return data; }
126 return data [characterIndex];
144 *data++ = charToWrite;
161 #if JUCE_NATIVE_WCHAR_IS_UTF32 && ! JUCE_ANDROID 162 return wcslen (data);
203 template <
class CharPo
inter>
206 return sizeof (
CharType) * text.length();
216 template <
typename CharPo
inter>
225 const CharType* s = src.data;
227 while ((*data = *s) != 0)
238 template <
typename CharPo
inter>
248 template <
typename CharPo
inter>
255 template <
typename CharPo
inter>
261 #if JUCE_NATIVE_WCHAR_IS_UTF32 && ! JUCE_ANDROID 265 return wcscmp (data, other.data);
270 template <
typename CharPo
inter>
277 template <
typename CharPo
inter>
284 template <
typename CharPo
inter>
291 template <
typename CharPo
inter>
304 if (data[i] == charToFind)
352 return ((
unsigned int) character) < (
unsigned int) 0x10ffff;
358 maxBytesToRead /= (
int)
sizeof (CharType);
360 while (--maxBytesToRead >= 0 && *dataToTest != 0)
378 #endif // JUCE_CHARPOINTER_UTF32_H_INCLUDED void write(const juce_wchar charToWrite) noexcept
Definition: juce_CharPointer_UTF32.h:142
double getDoubleValue() const noexcept
Definition: juce_CharPointer_UTF32.h:344
static size_t lengthUpTo(CharPointerType text, const size_t maxCharsToCount) noexcept
Definition: juce_CharacterFunctions.h:307
void replaceChar(const juce_wchar newChar) noexcept
Definition: juce_CharPointer_UTF32.h:147
void writeAll(const CharPointer src) noexcept
Definition: juce_CharPointer_UTF32.h:217
void writeWithCharLimit(const CharPointer src, const int maxChars) noexcept
Definition: juce_CharPointer_UTF32.h:249
#define noexcept
Definition: juce_CompilerSupport.h:141
Definition: juce_Atomic.h:41
static size_t getBytesRequiredFor(const CharPointer text) noexcept
Definition: juce_CharPointer_UTF32.h:204
static juce_wchar toLowerCase(juce_wchar character) noexcept
Definition: juce_CharacterFunctions.cpp:40
CharPointer_UTF32 operator+(const int numToSkip) const noexcept
Definition: juce_CharPointer_UTF32.h:130
int64 getIntValue64() const noexcept
Definition: juce_CharPointer_UTF32.h:341
static int compare(CharPointerType1 s1, CharPointerType2 s2) noexcept
Definition: juce_CharacterFunctions.h:393
static Type findEndOfWhitespace(Type text) noexcept
Definition: juce_CharacterFunctions.h:586
CharPointer_UTF32 operator=(CharPointer_UTF32 other) noexcept
Definition: juce_CharPointer_UTF32.h:54
size_t lengthUpTo(const size_t maxCharsToCount) const noexcept
Definition: juce_CharPointer_UTF32.h:172
static size_t getBytesRequiredFor(const juce_wchar) noexcept
Definition: juce_CharPointer_UTF32.h:194
bool isLetter() const
Definition: juce_CharPointer_UTF32.h:325
bool isDigit() const
Definition: juce_CharPointer_UTF32.h:323
TOUCHINPUT int
Definition: juce_win32_Windowing.cpp:123
static double getDoubleValue(CharPointerType text) noexcept
Definition: juce_CharacterFunctions.h:253
bool operator<=(CharPointer_UTF32 other) const noexcept
Definition: juce_CharPointer_UTF32.h:69
juce_wchar & operator[](const int characterIndex) const noexcept
Definition: juce_CharPointer_UTF32.h:124
bool operator==(CharPointer_UTF32 other) const noexcept
Definition: juce_CharPointer_UTF32.h:67
static bool isValidString(const CharType *dataToTest, int maxBytesToRead)
Definition: juce_CharPointer_UTF32.h:356
static bool isDigit(char character) noexcept
Definition: juce_CharacterFunctions.cpp:78
static bool isLetterOrDigit(char character) noexcept
Definition: juce_CharacterFunctions.cpp:99
bool operator>(CharPointer_UTF32 other) const noexcept
Definition: juce_CharPointer_UTF32.h:72
static bool isWhitespace(char character) noexcept
Definition: juce_CharacterFunctions.cpp:68
bool isEmpty() const noexcept
Definition: juce_CharPointer_UTF32.h:81
static juce_wchar toUpperCase(juce_wchar character) noexcept
Definition: juce_CharacterFunctions.cpp:35
int indexOf(const juce_wchar charToFind, const bool ignoreCase) const noexcept
Definition: juce_CharPointer_UTF32.h:314
bool isUpperCase() const
Definition: juce_CharPointer_UTF32.h:329
static bool canRepresent(juce_wchar character) noexcept
Definition: juce_CharPointer_UTF32.h:350
static bool isLetter(char character) noexcept
Definition: juce_CharacterFunctions.cpp:88
size_t sizeInBytes() const noexcept
Definition: juce_CharPointer_UTF32.h:186
CharType * getAddress() const noexcept
Definition: juce_CharPointer_UTF32.h:75
bool operator!=(CharPointer_UTF32 other) const noexcept
Definition: juce_CharPointer_UTF32.h:68
static int indexOf(CharPointerType1 textToSearch, const CharPointerType2 substringToLookFor) noexcept
Definition: juce_CharacterFunctions.h:467
static void copyAll(DestCharPointerType &dest, SrcCharPointerType src) noexcept
Definition: juce_CharacterFunctions.h:332
static size_t copyWithDestByteLimit(DestCharPointerType &dest, SrcCharPointerType src, size_t maxBytesToWrite) noexcept
Definition: juce_CharacterFunctions.h:350
CharPointer_UTF32 atomicSwap(const CharPointer_UTF32 newValue)
Definition: juce_CharPointer_UTF32.h:368
bool operator<(CharPointer_UTF32 other) const noexcept
Definition: juce_CharPointer_UTF32.h:70
int indexOf(const juce_wchar charToFind) const noexcept
Definition: juce_CharPointer_UTF32.h:298
juce_wchar toUpperCase() const noexcept
Definition: juce_CharPointer_UTF32.h:334
void operator+=(const int numToSkip) noexcept
Definition: juce_CharPointer_UTF32.h:113
CharPointer_UTF32 findEndOfWhitespace() const noexcept
Definition: juce_CharPointer_UTF32.h:347
size_t length() const noexcept
Definition: juce_CharPointer_UTF32.h:159
static void copyWithCharLimit(DestCharPointerType &dest, SrcCharPointerType src, int maxChars) noexcept
Definition: juce_CharacterFunctions.h:377
bool isLowerCase() const
Definition: juce_CharPointer_UTF32.h:331
CharPointer_UTF32(const CharType *const rawPointer) noexcept
Definition: juce_CharPointer_UTF32.h:44
static int compareIgnoreCase(CharPointerType1 s1, CharPointerType2 s2) noexcept
Definition: juce_CharacterFunctions.h:427
void writeAll(const CharPointer_UTF32 src) noexcept
Definition: juce_CharPointer_UTF32.h:223
size_t lengthUpTo(const CharPointer_UTF32 end) const noexcept
Definition: juce_CharPointer_UTF32.h:178
int compareUpTo(const CharPointer other, const int maxChars) const noexcept
Definition: juce_CharPointer_UTF32.h:271
juce_wchar CharType
Definition: juce_CharPointer_UTF32.h:42
long long int64
Definition: juce_MathsFunctions.h:60
Definition: juce_CharPointer_UTF32.h:39
size_t writeWithDestByteLimit(const CharPointer src, const size_t maxDestBytes) noexcept
Definition: juce_CharPointer_UTF32.h:239
juce_wchar getAndAdvance() noexcept
Definition: juce_CharPointer_UTF32.h:102
int getIntValue32() const noexcept
Definition: juce_CharPointer_UTF32.h:339
bool operator>=(CharPointer_UTF32 other) const noexcept
Definition: juce_CharPointer_UTF32.h:71
static int indexOfChar(Type text, const juce_wchar charToFind) noexcept
Definition: juce_CharacterFunctions.h:544
void operator-=(const int numToSkip) noexcept
Definition: juce_CharPointer_UTF32.h:118
bool isWhitespace() const
Definition: juce_CharPointer_UTF32.h:321
int compare(const CharPointer other) const noexcept
Definition: juce_CharPointer_UTF32.h:256
int compareIgnoreCase(const CharPointer other) const
Definition: juce_CharPointer_UTF32.h:278
static int compareUpTo(CharPointerType1 s1, CharPointerType2 s2, int maxChars) noexcept
Definition: juce_CharacterFunctions.h:410
static int indexOfCharIgnoreCase(Type text, juce_wchar charToFind) noexcept
Definition: juce_CharacterFunctions.h:564
juce_wchar toLowerCase() const noexcept
Definition: juce_CharPointer_UTF32.h:336
static bool isLowerCase(juce_wchar character) noexcept
Definition: juce_CharacterFunctions.cpp:54
CharPointer_UTF32 findTerminatingNull() const noexcept
Definition: juce_CharPointer_UTF32.h:210
CharPointer_UTF32 operator--() noexcept
Definition: juce_CharPointer_UTF32.h:94
CharPointer_UTF32(const CharPointer_UTF32 &other) noexcept
Definition: juce_CharPointer_UTF32.h:49
static bool isUpperCase(juce_wchar character) noexcept
Definition: juce_CharacterFunctions.cpp:45
int indexOf(const CharPointer stringToFind) const noexcept
Definition: juce_CharPointer_UTF32.h:292
void writeNull() const noexcept
Definition: juce_CharPointer_UTF32.h:153
static int compareIgnoreCaseUpTo(CharPointerType1 s1, CharPointerType2 s2, int maxChars) noexcept
Definition: juce_CharacterFunctions.h:446
bool isLetterOrDigit() const
Definition: juce_CharPointer_UTF32.h:327
wchar_t juce_wchar
Definition: juce_CharacterFunctions.h:49
CharPointer_UTF32 operator-(const int numToSkip) const noexcept
Definition: juce_CharPointer_UTF32.h:136
juce_wchar operator*() const noexcept
Definition: juce_CharPointer_UTF32.h:84
int compareIgnoreCaseUpTo(const CharPointer other, const int maxChars) const noexcept
Definition: juce_CharPointer_UTF32.h:285
CharPointer_UTF32 operator++() noexcept
Definition: juce_CharPointer_UTF32.h:87