Loading...
Searching...
No Matches
juce::CharacterFunctions Class Reference

## Detailed Description

A collection of functions for manipulating characters and character strings.

Most of these methods are designed for internal use by the String and CharPointer classes, but some of them may be useful to call directly.

See also
  String, CharPointer_UTF8, CharPointer_UTF16, CharPointer_UTF32

The documentation for this class was generated from the following file:

- juce_core/text/juce_CharacterFunctions.h

## Classes

struct | HexParser
| Parses a character string, to read a hexadecimal value. More...

## Static Public Member Functions

static juce_wchar | toUpperCase (juce_wchar character) noexcept
| Converts a character to upper-case.
static juce_wchar | toLowerCase (juce_wchar character) noexcept
| Converts a character to lower-case.
static bool | isUpperCase (juce_wchar character) noexcept
| Checks whether a unicode character is upper-case.
static bool | isLowerCase (juce_wchar character) noexcept
| Checks whether a unicode character is lower-case.
static bool | isWhitespace (char character) noexcept
| Checks whether a character is whitespace.
static bool | isWhitespace (juce_wchar character) noexcept
| Checks whether a character is whitespace.
static bool | isDigit (char character) noexcept
| Checks whether a character is a digit.
static bool | isDigit (juce_wchar character) noexcept
| Checks whether a character is a digit.
static bool | isLetter (char character) noexcept
| Checks whether a character is alphabetic.
static bool | isLetter (juce_wchar character) noexcept
| Checks whether a character is alphabetic.
static bool | isLetterOrDigit (char character) noexcept
| Checks whether a character is alphabetic or numeric.
static bool | isLetterOrDigit (juce_wchar character) noexcept
| Checks whether a character is alphabetic or numeric.
static bool | isPrintable (char character) noexcept
| Checks whether a character is a printable character, i.e.
static bool | isPrintable (juce_wchar character) noexcept
| Checks whether a character is a printable character, i.e.
static int | getHexDigitValue (juce_wchar digit) noexcept
| Returns 0 to 16 for '0' to 'F", or -1 for characters that aren't a legal hex digit.
static juce_wchar | getUnicodeCharFromWindows1252Codepage (uint8 windows1252Char) noexcept
| Converts a byte of Windows 1252 codepage to unicode.
static constexpr bool | isPartOfBasicMultilingualPlane (juce_wchar character) noexcept
| Returns true if a unicode code point is part of the basic multilingual plane.
static constexpr bool | isAscii (juce_wchar character) noexcept
| Returns true if a unicode code point is in the range os ASCII characters.
static constexpr bool | isAsciiControlCharacter (juce_wchar character) noexcept
| Returns true if a unicode code point is in the range of ASCII control characters.
static constexpr bool | isSurrogate (juce_wchar character) noexcept
| Returns true if a unicode code point is in the range of UTF-16 surrogate code units.
static constexpr bool | isHighSurrogate (juce_wchar character) noexcept
| Returns true if a unicode code point is in the range of UTF-16 high surrogate code units.
static constexpr bool | isLowSurrogate (juce_wchar character) noexcept
| Returns true if a unicode code point is in the range of UTF-16 low surrogate code units.
static constexpr bool | isNonSurrogateCodePoint (juce_wchar character) noexcept
| Returns true if a unicode code point is in the range of valid unicode code points.
template<typename CharPointerType>
static double | readDoubleValue (CharPointerType &text) noexcept
| Parses a character string to read a floating-point number.
template<typename CharPointerType>
static double | getDoubleValue (CharPointerType text) noexcept
| Parses a character string, to read a floating-point value.
template<typename IntType, typename CharPointerType>
static IntType | getIntValue (const CharPointerType text) noexcept
| Parses a character string, to read an integer value.
template<typename CharPointerType>
static size_t | lengthUpTo (CharPointerType text, const size_t maxCharsToCount) noexcept
| Counts the number of characters in a given string, stopping if the count exceeds a specified limit.
template<typename CharPointerType>
static size_t | lengthUpTo (CharPointerType start, const CharPointerType end) noexcept
| Counts the number of characters in a given string, stopping if the count exceeds a specified end-pointer.
template<typename DestCharPointerType, typename SrcCharPointerType>
static void | copyAll (DestCharPointerType &dest, SrcCharPointerType src) noexcept
| Copies null-terminated characters from one string to another.
template<typename DestCharPointerType, typename SrcCharPointerType>
static size_t | copyWithDestByteLimit (DestCharPointerType &dest, SrcCharPointerType src, size_t maxBytesToWrite) noexcept
| Copies characters from one string to another, up to a null terminator or a given byte size limit.
template<typename DestCharPointerType, typename SrcCharPointerType>
static void | copyWithCharLimit (DestCharPointerType &dest, SrcCharPointerType src, int maxChars) noexcept
| Copies characters from one string to another, up to a null terminator or a given maximum number of characters.
static int | compare (juce_wchar char1, juce_wchar char2) noexcept
| Compares two characters.
template<typename CharPointerType1, typename CharPointerType2>
static int | compare (CharPointerType1 s1, CharPointerType2 s2) noexcept
| Compares two null-terminated character strings.
template<typename CharPointerType1, typename CharPointerType2>
static int | compareUpTo (CharPointerType1 s1, CharPointerType2 s2, int maxChars) noexcept
| Compares two null-terminated character strings, up to a given number of characters.
static int | compareIgnoreCase (juce_wchar char1, juce_wchar char2) noexcept
| Compares two characters, using a case-independant match.
template<typename CharPointerType1, typename CharPointerType2>
static int | compareIgnoreCase (CharPointerType1 s1, CharPointerType2 s2) noexcept
| Compares two null-terminated character strings, using a case-independant match.
template<typename CharPointerType1, typename CharPointerType2>
static int | compareIgnoreCaseUpTo (CharPointerType1 s1, CharPointerType2 s2, int maxChars) noexcept
| Compares two null-terminated character strings, using a case-independent match.
template<typename CharPointerType1, typename CharPointerType2>
static int | indexOf (CharPointerType1 textToSearch, const CharPointerType2 substringToLookFor) noexcept
| Finds the character index of a given substring in another string.
template<typename CharPointerType1, typename CharPointerType2>
static CharPointerType1 | find (CharPointerType1 textToSearch, const CharPointerType2 substringToLookFor) noexcept
| Returns a pointer to the first occurrence of a substring in a string.
template<typename CharPointerType>
static CharPointerType | find (CharPointerType textToSearch, const juce_wchar charToLookFor) noexcept
| Returns a pointer to the first occurrence of a substring in a string.
template<typename CharPointerType1, typename CharPointerType2>
static int | indexOfIgnoreCase (CharPointerType1 haystack, const CharPointerType2 needle) noexcept
| Finds the character index of a given substring in another string, using a case-independent match.
template<typename Type>
static int | indexOfChar (Type text, const juce_wchar charToFind) noexcept
| Finds the character index of a given character in another string.
template<typename Type>
static int | indexOfCharIgnoreCase (Type text, juce_wchar charToFind) noexcept
| Finds the character index of a given character in another string, using a case-independent match.
template<typename Type, typename Predicate>
static Type | trimBegin (Type begin, const Type end, Predicate &&shouldTrim)
| Given a CharacterPointer range and a predicate, returns a pointer to the first character in the range that does not satisfy the predicate.
template<typename Type, typename Predicate>
static Type | trimEnd (const Type begin, Type end, Predicate &&shouldTrim)
| Given a CharacterPointer range and a predicate, returns a pointer one-past the last character in the range that does not satisfy the predicate.
template<typename Type>
static void | incrementToEndOfWhitespace (Type &text) noexcept
| Increments a pointer until it points to the first non-whitespace character in a string.
template<typename Type>
static Type | findEndOfWhitespace (Type text) noexcept
| Returns a pointer to the first non-whitespace character in a string.
template<typename Type, typename BreakType>
static Type | findEndOfToken (Type text, BreakType breakCharacters, Type quoteCharacters)
| Returns a pointer to the first character in the string which is found in the breakCharacters string.

## Member Functions

## toUpperCase()

juce_wchar juce::CharacterFunctions::toUpperCase | ( | juce_wchar | character | ) |

static noexcept

Converts a character to upper-case.

Referenced by compareIgnoreCase(), juce::CharPointer_ASCII::toUpperCase(), juce::CharPointer_UTF16::toUpperCase(), juce::CharPointer_UTF32::toUpperCase(), and juce::CharPointer_UTF8::toUpperCase().

## toLowerCase()

juce_wchar juce::CharacterFunctions::toLowerCase | ( | juce_wchar | character | ) |

static noexcept

Converts a character to lower-case.

Referenced by indexOfCharIgnoreCase(), juce::CharPointer_ASCII::toLowerCase(), juce::CharPointer_UTF16::toLowerCase(), juce::CharPointer_UTF32::toLowerCase(), and juce::CharPointer_UTF8::toLowerCase().

## isUpperCase()

bool juce::CharacterFunctions::isUpperCase | ( | juce_wchar | character | ) |

static noexcept

Checks whether a unicode character is upper-case.

Referenced by juce::CharPointer_ASCII::isUpperCase(), juce::CharPointer_UTF16::isUpperCase(), juce::CharPointer_UTF32::isUpperCase(), and juce::CharPointer_UTF8::isUpperCase().

## isLowerCase()

bool juce::CharacterFunctions::isLowerCase | ( | juce_wchar | character | ) |

static noexcept

Checks whether a unicode character is lower-case.

Referenced by juce::CharPointer_ASCII::isLowerCase(), juce::CharPointer_UTF16::isLowerCase(), juce::CharPointer_UTF32::isLowerCase(), and juce::CharPointer_UTF8::isLowerCase().

## isWhitespace() [1/2]

bool juce::CharacterFunctions::isWhitespace | ( | char | character | ) |

static noexcept

Checks whether a character is whitespace.

Referenced by juce::CharPointer_ASCII::isWhitespace(), juce::CharPointer_UTF16::isWhitespace(), juce::CharPointer_UTF32::isWhitespace(), and juce::CharPointer_UTF8::isWhitespace().

## isWhitespace() [2/2]

bool juce::CharacterFunctions::isWhitespace | ( | juce_wchar | character | ) |

static noexcept

Checks whether a character is whitespace.

## isDigit() [1/2]

bool juce::CharacterFunctions::isDigit | ( | char | character | ) |

static noexcept

Checks whether a character is a digit.

Referenced by juce::CharPointer_ASCII::isDigit(), juce::CharPointer_UTF16::isDigit(), and juce::CharPointer_UTF32::isDigit().

## isDigit() [2/2]

bool juce::CharacterFunctions::isDigit | ( | juce_wchar | character | ) |

static noexcept

Checks whether a character is a digit.

## isLetter() [1/2]

bool juce::CharacterFunctions::isLetter | ( | char | character | ) |

static noexcept

Checks whether a character is alphabetic.

Referenced by juce::CppTokeniserFunctions::isIdentifierStart(), juce::CharPointer_ASCII::isLetter(), juce::CharPointer_UTF16::isLetter(), juce::CharPointer_UTF32::isLetter(), and juce::CharPointer_UTF8::isLetter().

## isLetter() [2/2]

bool juce::CharacterFunctions::isLetter | ( | juce_wchar | character | ) |

static noexcept

Checks whether a character is alphabetic.

## isLetterOrDigit() [1/2]

bool juce::CharacterFunctions::isLetterOrDigit | ( | char | character | ) |

static noexcept

Checks whether a character is alphabetic or numeric.

Referenced by juce::CppTokeniserFunctions::isIdentifierBody(), juce::CharPointer_ASCII::isLetterOrDigit(), juce::CharPointer_UTF16::isLetterOrDigit(), juce::CharPointer_UTF32::isLetterOrDigit(), juce::CharPointer_UTF8::isLetterOrDigit(), and juce::CppTokeniserFunctions::skipNumberSuffix().

## isLetterOrDigit() [2/2]

bool juce::CharacterFunctions::isLetterOrDigit | ( | juce_wchar | character | ) |

static noexcept

Checks whether a character is alphabetic or numeric.

## isPrintable() [1/2]

bool juce::CharacterFunctions::isPrintable | ( | char | character | ) |

static noexcept

Checks whether a character is a printable character, i.e.

alphabetic, numeric, a punctuation character or a space.

## isPrintable() [2/2]

bool juce::CharacterFunctions::isPrintable | ( | juce_wchar | character | ) |

static noexcept

Checks whether a character is a printable character, i.e.

alphabetic, numeric, a punctuation character or a space.

## getHexDigitValue()

int juce::CharacterFunctions::getHexDigitValue | ( | juce_wchar | digit | ) |

static noexcept

Returns 0 to 16 for '0' to 'F", or -1 for characters that aren't a legal hex digit.

Referenced by juce::CharacterFunctions::HexParser< ResultType >::parse(), and juce::CppTokeniserFunctions::writeEscapeChars().

## getUnicodeCharFromWindows1252Codepage()

juce_wchar juce::CharacterFunctions::getUnicodeCharFromWindows1252Codepage | ( | uint8 | windows1252Char | ) |

static noexcept

Converts a byte of Windows 1252 codepage to unicode.

## isPartOfBasicMultilingualPlane()

constexpr bool juce::CharacterFunctions::isPartOfBasicMultilingualPlane | ( | juce_wchar | character | ) |

inline static constexpr noexcept

Returns true if a unicode code point is part of the basic multilingual plane.

See also
  isAscii, isNonSurrogateCodePoint

## isAscii()

constexpr bool juce::CharacterFunctions::isAscii | ( | juce_wchar | character | ) |

inline static constexpr noexcept

Returns true if a unicode code point is in the range os ASCII characters.

See also
  isAsciiControlCharacter, isPartOfBasicMultilingualPlane

Referenced by juce::CharPointer_ASCII::canRepresent(), and juce::CharPointer_UTF8::isValidString().

## isAsciiControlCharacter()

constexpr bool juce::CharacterFunctions::isAsciiControlCharacter | ( | juce_wchar | character | ) |

inline static constexpr noexcept

Returns true if a unicode code point is in the range of ASCII control characters.

See also
  isAscii

## isSurrogate()

constexpr bool juce::CharacterFunctions::isSurrogate | ( | juce_wchar | character | ) |

inline static constexpr noexcept

Returns true if a unicode code point is in the range of UTF-16 surrogate code units.

See also
  isHighSurrogate, isLowSurrogate

Referenced by isNonSurrogateCodePoint().

## isHighSurrogate()

constexpr bool juce::CharacterFunctions::isHighSurrogate | ( | juce_wchar | character | ) |

inline static constexpr noexcept

Returns true if a unicode code point is in the range of UTF-16 high surrogate code units.

See also
  isLowSurrogate, isSurrogate

Referenced by juce::CharPointer_UTF16::isValidString(), juce::CharPointer_UTF16::length(), juce::CharPointer_UTF16::operator++(), and juce::CharPointer_UTF16::operator--().

## isLowSurrogate()

constexpr bool juce::CharacterFunctions::isLowSurrogate | ( | juce_wchar | character | ) |

inline static constexpr noexcept

Returns true if a unicode code point is in the range of UTF-16 low surrogate code units.

See also
  isHighSurrogate, isSurrogate

Referenced by juce::CharPointer_UTF16::isValidString(), juce::CharPointer_UTF16::operator++(), and juce::CharPointer_UTF16::operator--().

## isNonSurrogateCodePoint()

constexpr bool juce::CharacterFunctions::isNonSurrogateCodePoint | ( | juce_wchar | character | ) |

inline static constexpr noexcept

Returns true if a unicode code point is in the range of valid unicode code points.

References isSurrogate().

Referenced by juce::CharPointer_UTF16::canRepresent(), juce::CharPointer_UTF32::canRepresent(), and juce::CharPointer_UTF8::canRepresent().

## readDoubleValue()

template<typename CharPointerType>

double juce::CharacterFunctions::readDoubleValue | ( | CharPointerType & | text | ) |

inline static noexcept

Parses a character string to read a floating-point number.

Note that this will advance the pointer that is passed in, leaving it at the end of the number.

References JUCE_FALLTHROUGH.

Referenced by getDoubleValue().

## getDoubleValue()

template<typename CharPointerType>

double juce::CharacterFunctions::getDoubleValue | ( | CharPointerType | text | ) |

inline static noexcept

Parses a character string, to read a floating-point value.

References readDoubleValue().

Referenced by juce::CharPointer_ASCII::getDoubleValue(), juce::CharPointer_UTF16::getDoubleValue(), juce::CharPointer_UTF32::getDoubleValue(), and juce::CharPointer_UTF8::getDoubleValue().

## getIntValue()

template<typename IntType, typename CharPointerType>

IntType juce::CharacterFunctions::getIntValue | ( | const CharPointerType | text | ) |

inline static noexcept

Parses a character string, to read an integer value.

Referenced by juce::CharPointer_UTF16::getIntValue32(), juce::CharPointer_UTF32::getIntValue32(), juce::CharPointer_ASCII::getIntValue64(), juce::CharPointer_UTF16::getIntValue64(), and juce::CharPointer_UTF32::getIntValue64().

## lengthUpTo() [1/2]

template<typename CharPointerType>

size_t juce::CharacterFunctions::lengthUpTo | ( | CharPointerType | text,
|  | const size_t | maxCharsToCount )

inline static noexcept

Counts the number of characters in a given string, stopping if the count exceeds a specified limit.

Referenced by juce::CharPointer_ASCII::lengthUpTo(), juce::CharPointer_ASCII::lengthUpTo(), juce::CharPointer_UTF16::lengthUpTo(), juce::CharPointer_UTF16::lengthUpTo(), juce::CharPointer_UTF32::lengthUpTo(), juce::CharPointer_UTF32::lengthUpTo(), juce::CharPointer_UTF8::lengthUpTo(), and juce::CharPointer_UTF8::lengthUpTo().

## lengthUpTo() [2/2]

template<typename CharPointerType>

size_t juce::CharacterFunctions::lengthUpTo | ( | CharPointerType | start,
|  | const CharPointerType | end )

inline static noexcept

Counts the number of characters in a given string, stopping if the count exceeds a specified end-pointer.

References juce::end().

## copyAll()

template<typename DestCharPointerType, typename SrcCharPointerType>

void juce::CharacterFunctions::copyAll | ( | DestCharPointerType & | dest,
|  | SrcCharPointerType | src )

inline static noexcept

Copies null-terminated characters from one string to another.

Referenced by juce::CharPointer_ASCII::writeAll(), juce::CharPointer_UTF16::writeAll(), juce::CharPointer_UTF32::writeAll(), and juce::CharPointer_UTF8::writeAll().

## copyWithDestByteLimit()

template<typename DestCharPointerType, typename SrcCharPointerType>

size_t juce::CharacterFunctions::copyWithDestByteLimit | ( | DestCharPointerType & | dest,
|  | SrcCharPointerType | src,
|  | size_t | maxBytesToWrite )

inline static noexcept

Copies characters from one string to another, up to a null terminator or a given byte size limit.

References juce::getAddressDifference().

Referenced by juce::CharPointer_ASCII::writeWithDestByteLimit(), juce::CharPointer_UTF16::writeWithDestByteLimit(), juce::CharPointer_UTF32::writeWithDestByteLimit(), and juce::CharPointer_UTF8::writeWithDestByteLimit().

## copyWithCharLimit()

template<typename DestCharPointerType, typename SrcCharPointerType>

void juce::CharacterFunctions::copyWithCharLimit | ( | DestCharPointerType & | dest,
|  | SrcCharPointerType | src,
|  | int | maxChars )

inline static noexcept

Copies characters from one string to another, up to a null terminator or a given maximum number of characters.

Referenced by juce::CharPointer_ASCII::writeWithCharLimit(), juce::CharPointer_UTF16::writeWithCharLimit(), juce::CharPointer_UTF32::writeWithCharLimit(), and juce::CharPointer_UTF8::writeWithCharLimit().

## compare() [1/2]

int juce::CharacterFunctions::compare | ( | juce_wchar | char1,
|  | juce_wchar | char2 )

inline static noexcept

Compares two characters.

Referenced by compare(), juce::CharPointer_ASCII::compare(), juce::CharPointer_UTF16::compare(), juce::CharPointer_UTF32::compare(), juce::CharPointer_UTF8::compare(), compareIgnoreCase(), and compareUpTo().

## compare() [2/2]

template<typename CharPointerType1, typename CharPointerType2>

int juce::CharacterFunctions::compare | ( | CharPointerType1 | s1,
|  | CharPointerType2 | s2 )

inline static noexcept

Compares two null-terminated character strings.

References compare().

## compareUpTo()

template<typename CharPointerType1, typename CharPointerType2>

int juce::CharacterFunctions::compareUpTo | ( | CharPointerType1 | s1,
|  | CharPointerType2 | s2,
|  | int | maxChars )

inline static noexcept

Compares two null-terminated character strings, up to a given number of characters.

References compare().

Referenced by juce::CharPointer_ASCII::compareUpTo(), juce::CharPointer_UTF16::compareUpTo(), juce::CharPointer_UTF32::compareUpTo(), and juce::CharPointer_UTF8::compareUpTo().

## compareIgnoreCase() [1/2]

int juce::CharacterFunctions::compareIgnoreCase | ( | juce_wchar | char1,
|  | juce_wchar | char2 )

inline static noexcept

Compares two characters, using a case-independant match.

References compare(), and toUpperCase().

Referenced by compareIgnoreCase(), juce::CharPointer_ASCII::compareIgnoreCase(), juce::CharPointer_ASCII::compareIgnoreCase(), juce::CharPointer_UTF16::compareIgnoreCase(), juce::CharPointer_UTF32::compareIgnoreCase(), juce::CharPointer_UTF8::compareIgnoreCase(), juce::CharPointer_UTF8::compareIgnoreCase(), and compareIgnoreCaseUpTo().

## compareIgnoreCase() [2/2]

template<typename CharPointerType1, typename CharPointerType2>

int juce::CharacterFunctions::compareIgnoreCase | ( | CharPointerType1 | s1,
|  | CharPointerType2 | s2 )

inline static noexcept

Compares two null-terminated character strings, using a case-independant match.

References compareIgnoreCase().

## compareIgnoreCaseUpTo()

template<typename CharPointerType1, typename CharPointerType2>

int juce::CharacterFunctions::compareIgnoreCaseUpTo | ( | CharPointerType1 | s1,
|  | CharPointerType2 | s2,
|  | int | maxChars )

inline static noexcept

Compares two null-terminated character strings, using a case-independent match.

References compareIgnoreCase().

Referenced by juce::CharPointer_ASCII::compareIgnoreCaseUpTo(), juce::CharPointer_UTF16::compareIgnoreCaseUpTo(), juce::CharPointer_UTF32::compareIgnoreCaseUpTo(), and juce::CharPointer_UTF8::compareIgnoreCaseUpTo().

## indexOf()

template<typename CharPointerType1, typename CharPointerType2>

int juce::CharacterFunctions::indexOf | ( | CharPointerType1 | textToSearch,
|  | const CharPointerType2 | substringToLookFor )

inline static noexcept

Finds the character index of a given substring in another string.

Returns -1 if the substring is not found.

Referenced by juce::CharPointer_ASCII::indexOf(), juce::CharPointer_UTF16::indexOf(), juce::CharPointer_UTF32::indexOf(), and juce::CharPointer_UTF8::indexOf().

## find() [1/2]

template<typename CharPointerType1, typename CharPointerType2>

CharPointerType1 juce::CharacterFunctions::find | ( | CharPointerType1 | textToSearch,
|  | const CharPointerType2 | substringToLookFor )

inline static noexcept

Returns a pointer to the first occurrence of a substring in a string.

If the substring is not found, this will return a pointer to the string's null terminator.

## find() [2/2]

template<typename CharPointerType>

CharPointerType juce::CharacterFunctions::find | ( | CharPointerType | textToSearch,
|  | const juce_wchar | charToLookFor )

inline static noexcept

Returns a pointer to the first occurrence of a substring in a string.

If the substring is not found, this will return a pointer to the string's null terminator.

## indexOfIgnoreCase()

template<typename CharPointerType1, typename CharPointerType2>

int juce::CharacterFunctions::indexOfIgnoreCase | ( | CharPointerType1 | haystack,
|  | const CharPointerType2 | needle )

inline static noexcept

Finds the character index of a given substring in another string, using a case-independent match.

Returns -1 if the substring is not found.

## indexOfChar()

template<typename Type>

int juce::CharacterFunctions::indexOfChar | ( | Type | text,
|  | const juce_wchar | charToFind )

inline static noexcept

Finds the character index of a given character in another string.

Returns -1 if the character is not found.

Referenced by juce::CharPointer_ASCII::indexOf(), juce::CharPointer_UTF16::indexOf(), juce::CharPointer_UTF16::indexOf(), juce::CharPointer_UTF32::indexOf(), juce::CharPointer_UTF8::indexOf(), and juce::CharPointer_UTF8::indexOf().

## indexOfCharIgnoreCase()

template<typename Type>

int juce::CharacterFunctions::indexOfCharIgnoreCase | ( | Type | text,
|  | juce_wchar | charToFind )

inline static noexcept

Finds the character index of a given character in another string, using a case-independent match.

Returns -1 if the character is not found.

References toLowerCase().

Referenced by juce::CharPointer_ASCII::indexOf(), juce::CharPointer_UTF16::indexOf(), juce::CharPointer_UTF32::indexOf(), and juce::CharPointer_UTF8::indexOf().

## trimBegin()

template<typename Type, typename Predicate>

Type juce::CharacterFunctions::trimBegin | ( | Type | begin,
|  | const Type | end,
|  | Predicate && | shouldTrim )

inline static

Given a CharacterPointer range and a predicate, returns a pointer to the first character in the range that does not satisfy the predicate.

References juce::begin(), and juce::end().

## trimEnd()

template<typename Type, typename Predicate>

Type juce::CharacterFunctions::trimEnd | ( | const Type | begin,
|  | Type | end,
|  | Predicate && | shouldTrim )

inline static

Given a CharacterPointer range and a predicate, returns a pointer one-past the last character in the range that does not satisfy the predicate.

References juce::begin(), and juce::end().

## incrementToEndOfWhitespace()

template<typename Type>

void juce::CharacterFunctions::incrementToEndOfWhitespace | ( | Type & | text | ) |

inline static noexcept

Increments a pointer until it points to the first non-whitespace character in a string.

If the string contains only whitespace, the pointer will point to the string's null terminator.

Referenced by findEndOfWhitespace(), juce::CharPointer_ASCII::incrementToEndOfWhitespace(), juce::CharPointer_UTF16::incrementToEndOfWhitespace(), juce::CharPointer_UTF32::incrementToEndOfWhitespace(), and juce::CharPointer_UTF8::incrementToEndOfWhitespace().

## findEndOfWhitespace()

template<typename Type>

Type juce::CharacterFunctions::findEndOfWhitespace | ( | Type | text | ) |

inline static noexcept

Returns a pointer to the first non-whitespace character in a string.

If the string contains only whitespace, this will return a pointer to its null terminator.

References incrementToEndOfWhitespace().

Referenced by juce::CharPointer_ASCII::findEndOfWhitespace(), juce::CharPointer_UTF16::findEndOfWhitespace(), juce::CharPointer_UTF32::findEndOfWhitespace(), and juce::CharPointer_UTF8::findEndOfWhitespace().

## findEndOfToken()

template<typename Type, typename BreakType>

Type juce::CharacterFunctions::findEndOfToken | ( | Type | text,
|  | BreakType | breakCharacters,
|  | Type | quoteCharacters )

inline static

Returns a pointer to the first character in the string which is found in the breakCharacters string.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited