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; }
120 bool operator== (
StringRef s)
const noexcept {
return text.compare (s.text) == 0; }
122 bool operator!= (
StringRef s)
const noexcept {
return text.compare (s.text) != 0; }
128 #if JUCE_STRING_UTF_TYPE != 8 && ! defined (DOXYGEN)
142 inline String operator+ (StringRef s1,
const String& s2) {
return String (s1.text) + s2; }
143 inline String operator+ (
const char* s1, StringRef s2) {
return String (s1) + String (s2.text); }
144 inline String operator+ (StringRef s1,
const char* s2) {
return String (s1.text) + String (s2); }