37 using CharType =
char;
54 data =
const_cast<CharType*
> (text);
61 inline bool operator<= (CharPointer_UTF8 other)
const noexcept {
return data <= other.data; }
62 inline bool operator< (CharPointer_UTF8 other)
const noexcept {
return data < other.data; }
63 inline bool operator>= (CharPointer_UTF8 other)
const noexcept {
return data >= other.data; }
64 inline bool operator> (CharPointer_UTF8 other)
const noexcept {
return data > other.data; }
70 inline operator const CharType*()
const noexcept {
return data; }
81 auto byte = (
signed char) *data;
91 while ((n &
bit) != 0 &&
bit > 0x8)
117 jassert (*data != 0);
118 auto n = (
signed char) *data++;
124 while ((
static_cast<uint8> (n) &
bit) != 0 &&
bit > 0x8)
139 while ((*--data & 0xc0) == 0x80 && ++count < 4)
149 auto byte = (
signed char) *data++;
159 while ((n &
bit) != 0 &&
bit > 0x8)
248 while ((*d & 0xc0) == 0x80)
277 jassert (data !=
nullptr);
307 template <
class CharPo
inter>
312 while (
auto n = text.getAndAdvance())
342 *data++ = (CharType) (0x80 | (0x3f & (
c >> (
numExtraBytes * 6))));
346 *data++ = (CharType)
c;
357 template <
typename CharPo
inter>
368 while ((*data = *s) != 0)
379 template <
typename CharPo
inter>
389 template <
typename CharPo
inter>
396 template <
typename CharPo
inter>
403 template <
typename CharPo
inter>
410 template <
typename CharPo
inter>
423 template <
typename CharPo
inter>
430 template <
typename CharPo
inter>
473 #if JUCE_WINDOWS && ! JUCE_MINGW
504 while ((
byte &
bit) != 0)
542 byteOrderMark1 = 0xef,
543 byteOrderMark2 = 0xbb,
544 byteOrderMark3 = 0xbf
555 return c[0] == (
uint8) byteOrderMark1
556 &&
c[1] == (
uint8) byteOrderMark2
557 &&
c[2] == (
uint8) byteOrderMark3;
ElementType * data() noexcept
int compareIgnoreCase(const CharPointer_UTF8 other) const noexcept
int indexOf(const juce_wchar charToFind) const noexcept
int compareUpTo(const CharPointer other, const int maxChars) const noexcept
void writeAll(const CharPointer src) noexcept
CharPointer_UTF8 & operator++() noexcept
CharPointer_UTF8 findTerminatingNull() const noexcept
int compareIgnoreCaseUpTo(const CharPointer other, const int maxChars) const noexcept
static size_t getBytesRequiredFor(CharPointer text) noexcept
void operator+=(int numToSkip) noexcept
bool isLetterOrDigit() const noexcept
juce_wchar operator*() const noexcept
bool isLetter() const noexcept
size_t lengthUpTo(const CharPointer_UTF8 end) const noexcept
juce_wchar getAndAdvance() noexcept
size_t writeWithDestByteLimit(const CharPointer src, const size_t maxDestBytes) noexcept
bool isNotEmpty() const noexcept
size_t lengthUpTo(const size_t maxCharsToCount) const noexcept
CharPointer_UTF8 operator-(int numToSkip) const noexcept
void operator-=(int numToSkip) noexcept
double getDoubleValue() const noexcept
size_t sizeInBytes() const noexcept
CharPointer_UTF8 operator--() noexcept
void writeAll(const CharPointer_UTF8 src) noexcept
void writeNull() const noexcept
bool isEmpty() const noexcept
juce_wchar toUpperCase() const noexcept
static size_t getBytesRequiredFor(const juce_wchar charToWrite) noexcept
int indexOf(const CharPointer stringToFind) const noexcept
int64 getIntValue64() const noexcept
static bool canRepresent(juce_wchar character) noexcept
int indexOf(const juce_wchar charToFind, const bool ignoreCase) const noexcept
int getIntValue32() const noexcept
bool isUpperCase() const noexcept
int compareIgnoreCase(const CharPointer other) const noexcept
bool isLowerCase() const noexcept
static bool isByteOrderMark(const void *possibleByteOrder) noexcept
void writeWithCharLimit(const CharPointer src, const int maxChars) noexcept
CharPointer_UTF8 atomicSwap(const CharPointer_UTF8 newValue)
static bool isValidString(const CharType *dataToTest, int maxBytesToRead)
juce_wchar toLowerCase() const noexcept
juce_wchar operator[](int characterIndex) const noexcept
CharPointer_UTF8 operator+(int numToSkip) const noexcept
int compare(const CharPointer other) const noexcept
bool isWhitespace() const noexcept
bool operator==(CharPointer_UTF8 other) const noexcept
CharPointer_UTF8 findEndOfWhitespace() const noexcept
bool isDigit() const noexcept
void write(const juce_wchar charToWrite) noexcept
CharType * getAddress() const noexcept
size_t length() const noexcept
static int compare(juce_wchar char1, juce_wchar char2) noexcept
static juce_wchar toLowerCase(juce_wchar character) noexcept
static size_t copyWithDestByteLimit(DestCharPointerType &dest, SrcCharPointerType src, size_t maxBytesToWrite) noexcept
static int indexOfCharIgnoreCase(Type text, juce_wchar charToFind) noexcept
static int compareIgnoreCaseUpTo(CharPointerType1 s1, CharPointerType2 s2, int maxChars) noexcept
static int indexOfChar(Type text, const juce_wchar charToFind) noexcept
static int compareIgnoreCase(juce_wchar char1, juce_wchar char2) noexcept
static bool isLowerCase(juce_wchar character) noexcept
static bool isLetter(char character) noexcept
static int indexOf(CharPointerType1 textToSearch, const CharPointerType2 substringToLookFor) noexcept
static size_t lengthUpTo(CharPointerType text, const size_t maxCharsToCount) noexcept
static Type findEndOfWhitespace(Type text) noexcept
static void copyWithCharLimit(DestCharPointerType &dest, SrcCharPointerType src, int maxChars) noexcept
static bool isLetterOrDigit(char character) noexcept
static juce_wchar toUpperCase(juce_wchar character) noexcept
static bool isUpperCase(juce_wchar character) noexcept
static double getDoubleValue(CharPointerType text) noexcept
static void copyAll(DestCharPointerType &dest, SrcCharPointerType src) noexcept
static int compareUpTo(CharPointerType1 s1, CharPointerType2 s2, int maxChars) noexcept