73 StringRef (
const char* stringLiteral) noexcept;
100 operator const String::CharPointerType::CharType*()
const noexcept {
return text.getAddress(); }
105 bool isEmpty() const noexcept {
return text.isEmpty(); }
107 bool isNotEmpty() const noexcept {
return ! text.isEmpty(); }
109 int length() const noexcept {
return (
int) text.length(); }
112 juce_wchar operator[] (
int index)
const noexcept {
return text[index]; }
115 bool operator== (
const String& s)
const noexcept {
return text.compare (s.getCharPointer()) == 0; }
117 bool operator!= (
const String& s)
const noexcept {
return text.compare (s.getCharPointer()) != 0; }
119 bool operator< (
const String& s)
const noexcept {
return text.compare (s.getCharPointer()) < 0; }
121 bool operator<= (
const String& s)
const noexcept {
return text.compare (s.getCharPointer()) <= 0; }
123 bool operator> (
const String& s)
const noexcept {
return text.compare (s.getCharPointer()) > 0; }
125 bool operator>= (
const String& s)
const noexcept {
return text.compare (s.getCharPointer()) >= 0; }
128 bool operator== (
StringRef s)
const noexcept {
return text.compare (s.text) == 0; }
130 bool operator!= (
StringRef s)
const noexcept {
return text.compare (s.text) != 0; }
136 #if JUCE_STRING_UTF_TYPE != 8 && ! defined (DOXYGEN) #define JUCE_API
This macro is added to all JUCE public class declarations.
A simple class for holding temporary references to a string literal or String.
int length() const noexcept
Returns the number of characters in the string.
bool isNotEmpty() const noexcept
Returns true if the string is not empty.
bool isEmpty() const noexcept
Returns true if the string is empty.
CharPointer_UTF8 CharPointerType
This is the character encoding type used internally to store the string.
String::CharPointerType text
The text that is referenced.
Wraps a pointer to a null-terminated UTF-8 character string, and provides various methods to operate ...