mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
NewLine: Add support for strings appearing on the opposite side of the plus operator
This commit is contained in:
parent
4ed15dbc9e
commit
51b46f3cd1
1 changed files with 5 additions and 3 deletions
|
|
@ -85,10 +85,12 @@ extern NewLine newLine;
|
|||
@endcode
|
||||
*/
|
||||
inline String& operator<< (String& string1, const NewLine&) { return string1 += NewLine::getDefault(); }
|
||||
inline String& operator+= (String& s1, const NewLine&) { return s1 += NewLine::getDefault(); }
|
||||
inline String& operator+= (String& s, const NewLine&) { return s += NewLine::getDefault(); }
|
||||
|
||||
inline String operator+ (const NewLine&, const NewLine&) { return String (NewLine::getDefault()) + NewLine::getDefault(); }
|
||||
inline String operator+ (String s1, const NewLine&) { return s1 += NewLine::getDefault(); }
|
||||
inline String operator+ (const NewLine&, const char* s2) { return String (NewLine::getDefault()) + s2; }
|
||||
inline String operator+ (String s, const NewLine&) { return s += NewLine::getDefault(); }
|
||||
inline String operator+ (const NewLine&, String s) { return NewLine::getDefault() + s; }
|
||||
inline String operator+ (const NewLine&, const char* s) { return String (NewLine::getDefault()) + s; }
|
||||
inline String operator+ (const char* s, const NewLine&) { return s + String (NewLine::getDefault()); }
|
||||
|
||||
} // namespace juce
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue