37 using CharType = juce_wchar;
40 : data (const_cast<CharType*> (rawPointer))
54 data =
const_cast<CharType*
> (text);
60 inline bool operator!= (
CharPointer_UTF32 other)
const noexcept {
return data != other.data; }
61 inline bool operator<= (
CharPointer_UTF32 other)
const noexcept {
return data <= other.data; }
62 inline bool operator< (
CharPointer_UTF32 other)
const noexcept {
return data < other.data; }
63 inline bool operator>= (
CharPointer_UTF32 other)
const noexcept {
return data >= other.data; }
64 inline bool operator> (
CharPointer_UTF32 other)
const noexcept {
return data > other.data; }
67 inline CharType*
getAddress() const noexcept {
return data; }
70 inline operator const CharType*()
const noexcept {
return data; }
73 inline bool isEmpty() const noexcept {
return *data == 0; }
76 inline bool isNotEmpty() const noexcept {
return *data != 0; }
79 inline juce_wchar
operator*() const noexcept {
return *data; }
113 inline void operator-= (
int numToSkip) noexcept
119 inline juce_wchar&
operator[] (
int characterIndex)
const noexcept
121 return data [characterIndex];
137 inline void write (juce_wchar charToWrite) noexcept
139 *data++ = charToWrite;
142 inline void replaceChar (juce_wchar newChar) noexcept
156 #if JUCE_NATIVE_WCHAR_IS_UTF32 && ! JUCE_ANDROID 157 return wcslen (data);
183 return sizeof (CharType) * (
length() + 1);
191 return sizeof (CharType);
198 template <
class CharPo
inter>
201 return sizeof (CharType) * text.length();
211 template <
typename CharPo
inter>
222 while ((*data = *s) != 0)
233 template <
typename CharPo
inter>
243 template <
typename CharPo
inter>
250 template <
typename CharPo
inter>
251 int compare (CharPointer other)
const noexcept
256 #if JUCE_NATIVE_WCHAR_IS_UTF32 && ! JUCE_ANDROID 260 return wcscmp (data, other.data);
265 template <
typename CharPo
inter>
272 template <
typename CharPo
inter>
279 template <
typename CharPo
inter>
286 template <
typename CharPo
inter>
287 int indexOf (CharPointer stringToFind)
const noexcept
293 int indexOf (juce_wchar charToFind)
const noexcept
299 if (data[i] == charToFind)
309 int indexOf (juce_wchar charToFind,
bool ignoreCase)
const noexcept
334 int getIntValue32() const noexcept {
return CharacterFunctions::getIntValue <int, CharPointer_UTF32> (*this); }
336 int64
getIntValue64() const noexcept {
return CharacterFunctions::getIntValue <int64, CharPointer_UTF32> (*this); }
347 return ((uint32) character) < (uint32) 0x10ffff;
353 maxBytesToRead /= (int)
sizeof (CharType);
355 while (--maxBytesToRead >= 0 && *dataToTest != 0)
bool isEmpty() const noexcept
static double getDoubleValue(CharPointerType text) noexcept
static size_t getBytesRequiredFor(juce_wchar) noexcept
static juce_wchar toUpperCase(juce_wchar character) noexcept
CharPointer_UTF32 operator--() noexcept
int compareUpTo(CharPointer other, int maxChars) const noexcept
CharPointer_UTF32 operator+(int numToSkip) const noexcept
static int indexOfCharIgnoreCase(Type text, juce_wchar charToFind) noexcept
static void copyAll(DestCharPointerType &dest, SrcCharPointerType src) noexcept
static int compareIgnoreCase(juce_wchar char1, juce_wchar char2) noexcept
CharPointer_UTF32 operator-(int numToSkip) const noexcept
int compare(CharPointer other) const noexcept
size_t writeWithDestByteLimit(CharPointer src, size_t maxDestBytes) noexcept
static bool isDigit(char character) noexcept
static Type findEndOfWhitespace(Type text) noexcept
void writeWithCharLimit(CharPointer src, int maxChars) noexcept
void writeNull() const noexcept
int64 getIntValue64() const noexcept
bool isWhitespace() const
size_t lengthUpTo(CharPointer_UTF32 end) const noexcept
int indexOf(juce_wchar charToFind, bool ignoreCase) const noexcept
static size_t getBytesRequiredFor(CharPointer text) noexcept
static bool isWhitespace(char character) noexcept
CharType * getAddress() const noexcept
juce_wchar operator*() const noexcept
void writeAll(CharPointer_UTF32 src) noexcept
CharPointer_UTF32 atomicSwap(CharPointer_UTF32 newValue)
size_t lengthUpTo(size_t maxCharsToCount) const noexcept
static int indexOfChar(Type text, const juce_wchar charToFind) noexcept
static int compareIgnoreCaseUpTo(CharPointerType1 s1, CharPointerType2 s2, int maxChars) noexcept
int indexOf(juce_wchar charToFind) const noexcept
bool isNotEmpty() const noexcept
static bool isUpperCase(juce_wchar character) noexcept
int compareIgnoreCaseUpTo(CharPointer other, int maxChars) const noexcept
juce_wchar getAndAdvance() noexcept
static size_t lengthUpTo(CharPointerType text, const size_t maxCharsToCount) noexcept
static bool isValidString(const CharType *dataToTest, int maxBytesToRead)
static size_t copyWithDestByteLimit(DestCharPointerType &dest, SrcCharPointerType src, size_t maxBytesToWrite) noexcept
size_t sizeInBytes() const noexcept
int getIntValue32() const noexcept
double getDoubleValue() const noexcept
int indexOf(CharPointer stringToFind) const noexcept
bool isLetterOrDigit() const
size_t length() const noexcept
static juce_wchar toLowerCase(juce_wchar character) noexcept
static bool isLetter(char character) noexcept
int compareIgnoreCase(CharPointer other) const
juce_wchar toUpperCase() const noexcept
CharPointer_UTF32 operator++() noexcept
juce_wchar toLowerCase() const noexcept
static int indexOf(CharPointerType1 textToSearch, const CharPointerType2 substringToLookFor) noexcept
void operator+=(int numToSkip) noexcept
static bool isLowerCase(juce_wchar character) noexcept
void write(juce_wchar charToWrite) noexcept
static bool canRepresent(juce_wchar character) noexcept
bool operator==(CharPointer_UTF32 other) const noexcept
juce_wchar & operator[](int characterIndex) const noexcept
static bool isLetterOrDigit(char character) noexcept
CharPointer_UTF32 findEndOfWhitespace() const noexcept
static int compareUpTo(CharPointerType1 s1, CharPointerType2 s2, int maxChars) noexcept
CharPointer_UTF32 findTerminatingNull() const noexcept
static void copyWithCharLimit(DestCharPointerType &dest, SrcCharPointerType src, int maxChars) noexcept
static int compare(juce_wchar char1, juce_wchar char2) noexcept
void writeAll(CharPointer src) noexcept