Go to the documentation of this file.
29 #ifndef JUCE_CHARPOINTER_ASCII_H_INCLUDED
30 #define JUCE_CHARPOINTER_ASCII_H_INCLUDED
48 : data (
const_cast <CharType*
> (rawPointer))
65 data =
const_cast <CharType*
> (text);
129 return (
juce_wchar) (
unsigned char) data [characterIndex];
147 *data++ = (char) charToWrite;
152 *data = (char) newChar;
164 return (
size_t) strlen (data);
199 template <
class CharPo
inter>
202 return text.length();
212 template <
typename CharPo
inter>
221 strcpy (data, src.data);
228 template <
typename CharPo
inter>
238 template <
typename CharPo
inter>
245 template <
typename CharPo
inter>
254 return strcmp (data, other.data);
258 template <
typename CharPo
inter>
267 return strncmp (data, other.data, (
size_t) maxChars);
271 template <
typename CharPo
inter>
280 return stricmp (data, other.data);
284 return strcasecmp (data, other.data);
289 template <
typename CharPo
inter>
296 template <
typename CharPo
inter>
309 if (data[i] == (
char) charToFind)
349 #if JUCE_LINUX || JUCE_ANDROID || JUCE_MINGW
352 return _atoi64 (data);
354 return CharacterFunctions::getIntValue <int64, CharPointer_ASCII> (*
this);
367 return ((
unsigned int) character) < (
unsigned int) 128;
373 while (--maxBytesToRead >= 0)
375 if (((
signed char) *dataToTest) <= 0)
376 return *dataToTest == 0;
389 #endif // JUCE_CHARPOINTER_ASCII_H_INCLUDED
bool operator==(CharPointer_ASCII other) const noexcept
Definition: juce_CharPointer_ASCII.h:70
static int compareIgnoreCase(CharPointerType1 s1, CharPointerType2 s2) noexcept
Definition: juce_CharacterFunctions.h:427
int indexOf(const CharPointer stringToFind) const noexcept
Definition: juce_CharPointer_ASCII.h:297
int indexOf(const juce_wchar charToFind) const noexcept
Definition: juce_CharPointer_ASCII.h:303
bool operator>(CharPointer_ASCII other) const noexcept
Definition: juce_CharPointer_ASCII.h:75
void replaceChar(const juce_wchar newChar) noexcept
Definition: juce_CharPointer_ASCII.h:150
juce_wchar operator*() const noexcept
Definition: juce_CharPointer_ASCII.h:87
void writeAll(const CharPointer src) noexcept
Definition: juce_CharPointer_ASCII.h:213
size_t length() const noexcept
Definition: juce_CharPointer_ASCII.h:162
static int indexOfChar(Type text, const juce_wchar charToFind) noexcept
Definition: juce_CharacterFunctions.h:544
static int compareUpTo(CharPointerType1 s1, CharPointerType2 s2, int maxChars) noexcept
Definition: juce_CharacterFunctions.h:410
void writeAll(const CharPointer_ASCII src) noexcept
Definition: juce_CharPointer_ASCII.h:219
void operator+=(const int numToSkip) noexcept
Definition: juce_CharPointer_ASCII.h:116
juce_wchar operator[](const int characterIndex) const noexcept
Definition: juce_CharPointer_ASCII.h:127
size_t sizeInBytes() const noexcept
Definition: juce_CharPointer_ASCII.h:182
CharPointer_ASCII(const CharType *const rawPointer) noexcept
Definition: juce_CharPointer_ASCII.h:47
CharPointer_ASCII operator-(const int numToSkip) const noexcept
Definition: juce_CharPointer_ASCII.h:139
static bool isValidString(const CharType *dataToTest, int maxBytesToRead)
Definition: juce_CharPointer_ASCII.h:371
CharPointer_ASCII findTerminatingNull() const noexcept
Definition: juce_CharPointer_ASCII.h:206
static bool isLowerCase(juce_wchar character) noexcept
Definition: juce_CharacterFunctions.cpp:54
bool isWhitespace() const
Definition: juce_CharPointer_ASCII.h:326
static double getDoubleValue(CharPointerType text) noexcept
Definition: juce_CharacterFunctions.h:253
bool isLowerCase() const
Definition: juce_CharPointer_ASCII.h:336
void writeWithCharLimit(const CharPointer src, const int maxChars) noexcept
Definition: juce_CharPointer_ASCII.h:239
static bool isUpperCase(juce_wchar character) noexcept
Definition: juce_CharacterFunctions.cpp:45
#define noexcept
Definition: juce_CompilerSupport.h:141
size_t lengthUpTo(const size_t maxCharsToCount) const noexcept
Definition: juce_CharPointer_ASCII.h:168
int compare(const CharPointer_ASCII other) const noexcept
Definition: juce_CharPointer_ASCII.h:252
juce_wchar toUpperCase() const noexcept
Definition: juce_CharPointer_ASCII.h:339
bool operator!=(CharPointer_ASCII other) const noexcept
Definition: juce_CharPointer_ASCII.h:71
static bool isWhitespace(char character) noexcept
Definition: juce_CharacterFunctions.cpp:68
bool isUpperCase() const
Definition: juce_CharPointer_ASCII.h:334
static size_t copyWithDestByteLimit(DestCharPointerType &dest, SrcCharPointerType src, size_t maxBytesToWrite) noexcept
Definition: juce_CharacterFunctions.h:350
int compareIgnoreCase(const CharPointer other) const
Definition: juce_CharPointer_ASCII.h:272
int compareIgnoreCaseUpTo(const CharPointer other, const int maxChars) const noexcept
Definition: juce_CharPointer_ASCII.h:290
int compareUpTo(const CharPointer other, const int maxChars) const noexcept
Definition: juce_CharPointer_ASCII.h:259
static size_t lengthUpTo(CharPointerType text, const size_t maxCharsToCount) noexcept
Definition: juce_CharacterFunctions.h:307
static void copyAll(DestCharPointerType &dest, SrcCharPointerType src) noexcept
Definition: juce_CharacterFunctions.h:332
CharPointer_ASCII findEndOfWhitespace() const noexcept
Definition: juce_CharPointer_ASCII.h:362
static bool canRepresent(juce_wchar character) noexcept
Definition: juce_CharPointer_ASCII.h:365
unsigned char uint8
Definition: juce_MathsFunctions.h:43
char CharType
Definition: juce_CharPointer_ASCII.h:45
bool isLetterOrDigit() const
Definition: juce_CharPointer_ASCII.h:332
void write(const juce_wchar charToWrite) noexcept
Definition: juce_CharPointer_ASCII.h:145
int64 getIntValue64() const noexcept
Definition: juce_CharPointer_ASCII.h:347
int compareUpTo(const CharPointer_ASCII other, const int maxChars) const noexcept
Definition: juce_CharPointer_ASCII.h:265
int getIntValue32() const noexcept
Definition: juce_CharPointer_ASCII.h:344
bool isLetter() const
Definition: juce_CharPointer_ASCII.h:330
int indexOf(const juce_wchar charToFind, const bool ignoreCase) const noexcept
Definition: juce_CharPointer_ASCII.h:319
CharPointer_ASCII operator+(const int numToSkip) const noexcept
Definition: juce_CharPointer_ASCII.h:133
CharPointer_ASCII operator=(const CharPointer_ASCII other) noexcept
Definition: juce_CharPointer_ASCII.h:57
CharPointer_ASCII(const CharPointer_ASCII &other) noexcept
Definition: juce_CharPointer_ASCII.h:52
bool isEmpty() const noexcept
Definition: juce_CharPointer_ASCII.h:84
bool operator>=(CharPointer_ASCII other) const noexcept
Definition: juce_CharPointer_ASCII.h:74
size_t writeWithDestByteLimit(const CharPointer src, const size_t maxDestBytes) noexcept
Definition: juce_CharPointer_ASCII.h:229
size_t lengthUpTo(const CharPointer_ASCII end) const noexcept
Definition: juce_CharPointer_ASCII.h:174
bool isDigit() const
Definition: juce_CharPointer_ASCII.h:328
static Type findEndOfWhitespace(Type text) noexcept
Definition: juce_CharacterFunctions.h:586
static juce_wchar toLowerCase(juce_wchar character) noexcept
Definition: juce_CharacterFunctions.cpp:40
Definition: juce_CharPointer_ASCII.h:42
static bool isLetterOrDigit(char character) noexcept
Definition: juce_CharacterFunctions.cpp:99
CharType * getAddress() const noexcept
Definition: juce_CharPointer_ASCII.h:78
static juce_wchar toUpperCase(juce_wchar character) noexcept
Definition: juce_CharacterFunctions.cpp:35
static int compare(CharPointerType1 s1, CharPointerType2 s2) noexcept
Definition: juce_CharacterFunctions.h:393
void writeNull() const noexcept
Definition: juce_CharPointer_ASCII.h:156
static bool isLetter(char character) noexcept
Definition: juce_CharacterFunctions.cpp:88
juce_wchar toLowerCase() const noexcept
Definition: juce_CharPointer_ASCII.h:341
static bool isDigit(char character) noexcept
Definition: juce_CharacterFunctions.cpp:78
void operator-=(const int numToSkip) noexcept
Definition: juce_CharPointer_ASCII.h:121
int compare(const CharPointer other) const noexcept
Definition: juce_CharPointer_ASCII.h:246
double getDoubleValue() const noexcept
Definition: juce_CharPointer_ASCII.h:359
static int indexOf(CharPointerType1 textToSearch, const CharPointerType2 substringToLookFor) noexcept
Definition: juce_CharacterFunctions.h:467
wchar_t juce_wchar
Definition: juce_CharacterFunctions.h:49
int compareIgnoreCase(const CharPointer_ASCII other) const
Definition: juce_CharPointer_ASCII.h:277
static size_t getBytesRequiredFor(const juce_wchar) noexcept
Definition: juce_CharPointer_ASCII.h:190
static int indexOfCharIgnoreCase(Type text, juce_wchar charToFind) noexcept
Definition: juce_CharacterFunctions.h:564
long long int64
Definition: juce_MathsFunctions.h:60
CharPointer_ASCII operator--() noexcept
Definition: juce_CharPointer_ASCII.h:97
CharPointer_ASCII operator++() noexcept
Definition: juce_CharPointer_ASCII.h:90
static void copyWithCharLimit(DestCharPointerType &dest, SrcCharPointerType src, int maxChars) noexcept
Definition: juce_CharacterFunctions.h:377
static int compareIgnoreCaseUpTo(CharPointerType1 s1, CharPointerType2 s2, int maxChars) noexcept
Definition: juce_CharacterFunctions.h:446
bool operator<=(CharPointer_ASCII other) const noexcept
Definition: juce_CharPointer_ASCII.h:72
juce_wchar getAndAdvance() noexcept
Definition: juce_CharPointer_ASCII.h:105
static size_t getBytesRequiredFor(const CharPointer text) noexcept
Definition: juce_CharPointer_ASCII.h:200
bool operator<(CharPointer_ASCII other) const noexcept
Definition: juce_CharPointer_ASCII.h:73