@@ -79,5 +79,8 @@ extern NewLine newLine; | |||||
*/ | */ | ||||
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const NewLine&); | JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const NewLine&); | ||||
#if JUCE_STRING_UTF_TYPE != 8 && ! defined (DOXYGEN) | |||||
inline String operator+ (String s1, const NewLine&) { return s1 += NewLine::getDefault(); } | |||||
#endif | |||||
#endif // JUCE_NEWLINE_H_INCLUDED | #endif // JUCE_NEWLINE_H_INCLUDED |
@@ -580,6 +580,11 @@ bool String::equalsIgnoreCase (const char* const t) const noexcept | |||||
: isEmpty(); | : isEmpty(); | ||||
} | } | ||||
bool String::equalsIgnoreCase (StringRef t) const noexcept | |||||
{ | |||||
return text.compareIgnoreCase (t.text) == 0; | |||||
} | |||||
bool String::equalsIgnoreCase (const String& other) const noexcept | bool String::equalsIgnoreCase (const String& other) const noexcept | ||||
{ | { | ||||
return text == other.text | return text == other.text | ||||
@@ -296,6 +296,9 @@ public: | |||||
/** Case-insensitive comparison with another string. */ | /** Case-insensitive comparison with another string. */ | ||||
bool equalsIgnoreCase (const String& other) const noexcept; | bool equalsIgnoreCase (const String& other) const noexcept; | ||||
/** Case-insensitive comparison with another string. */ | |||||
bool equalsIgnoreCase (StringRef other) const noexcept; | |||||
/** Case-insensitive comparison with another string. */ | /** Case-insensitive comparison with another string. */ | ||||
bool equalsIgnoreCase (const wchar_t* other) const noexcept; | bool equalsIgnoreCase (const wchar_t* other) const noexcept; | ||||
@@ -128,5 +128,8 @@ JUCE_API bool JUCE_CALLTYPE operator== (const String& string1, StringRef string2 | |||||
/** Case-sensitive comparison of two strings. */ | /** Case-sensitive comparison of two strings. */ | ||||
JUCE_API bool JUCE_CALLTYPE operator!= (const String& string1, StringRef string2) noexcept; | JUCE_API bool JUCE_CALLTYPE operator!= (const String& string1, StringRef string2) noexcept; | ||||
#if JUCE_STRING_UTF_TYPE != 8 && ! defined (DOXYGEN) | |||||
inline String operator+ (String s1, StringRef s2) { return s1 += String (s2.text); } | |||||
#endif | |||||
#endif // JUCE_STRINGREF_H_INCLUDED | #endif // JUCE_STRINGREF_H_INCLUDED |