69 StringRef (
const char* stringLiteral) noexcept;
75 StringRef (String::CharPointerType stringLiteral) noexcept;
96 operator const String::CharPointerType::CharType*()
const noexcept {
return text.getAddress(); }
98 operator String::CharPointerType() const noexcept {
return text; }
101 bool isEmpty() const noexcept {
return text.isEmpty(); }
103 bool isNotEmpty() const noexcept {
return ! text.isEmpty(); }
105 int length() const noexcept {
return (
int) text.length(); }
108 juce_wchar operator[] (
int index)
const noexcept {
return text[index]; }
111 bool operator== (
const String& s)
const noexcept {
return text.compare (s.getCharPointer()) == 0; }
113 bool operator!= (
const String& s)
const noexcept {
return text.compare (s.getCharPointer()) != 0; }
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; }
124 bool operator== (
StringRef s)
const noexcept {
return text.compare (s.text) == 0; }
126 bool operator!= (
StringRef s)
const noexcept {
return text.compare (s.text) != 0; }
132 #if JUCE_STRING_UTF_TYPE != 8 && ! defined (DOXYGEN) 141 JUCE_API
bool JUCE_CALLTYPE operator== (
const String& string1,
StringRef string2) noexcept;
143 JUCE_API
bool JUCE_CALLTYPE operator!= (
const String& string1,
StringRef string2) noexcept;
145 JUCE_API
bool JUCE_CALLTYPE operator< (
const String& string1,
StringRef string2) noexcept;
147 JUCE_API
bool JUCE_CALLTYPE operator<= (
const String& string1,
StringRef string2) noexcept;
149 JUCE_API
bool JUCE_CALLTYPE operator> (
const String& string1,
StringRef string2) noexcept;
151 JUCE_API
bool JUCE_CALLTYPE operator>= (
const String& string1,
StringRef string2) noexcept;
int length() const noexcept
bool isNotEmpty() const noexcept
bool isEmpty() const noexcept
String::CharPointerType text