Browse Source

Added operator<< bool to the String class

tags/2021-05-28
tpoole 8 years ago
parent
commit
041feb1688
2 changed files with 13 additions and 8 deletions
  1. +2
    -0
      modules/juce_core/text/juce_String.cpp
  2. +11
    -8
      modules/juce_core/text/juce_String.h

+ 2
- 0
modules/juce_core/text/juce_String.cpp View File

@@ -868,6 +868,8 @@ JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const uint64 number)
JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const float number) { return s1 += String (number); }
JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, const double number) { return s1 += String (number); }
JUCE_API String& JUCE_CALLTYPE operator<< (String& s1, bool b) { return s1 += String (b); }
JUCE_API OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const String& text)
{
return operator<< (stream, StringRef (text));


+ 11
- 8
modules/juce_core/text/juce_String.h View File

@@ -1323,23 +1323,26 @@ JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, const String& string
/** Appends a string to the end of the first one. */
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, StringRef string2);
/** Appends a decimal number at the end of a string. */
/** Appends a decimal number to the end of a string. */
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, short number);
/** Appends a decimal number at the end of a string. */
/** Appends a decimal number to the end of a string. */
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, int number);
/** Appends a decimal number at the end of a string. */
/** Appends a decimal number to the end of a string. */
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, long number);
/** Appends a decimal number at the end of a string. */
/** Appends a decimal number to the end of a string. */
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, unsigned long number);
/** Appends a decimal number at the end of a string. */
/** Appends a decimal number to the end of a string. */
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, int64 number);
/** Appends a decimal number at the end of a string. */
/** Appends a decimal number to the end of a string. */
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, uint64 number);
/** Appends a decimal number at the end of a string. */
/** Appends a decimal number to the end of a string. */
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, float number);
/** Appends a decimal number at the end of a string. */
/** Appends a decimal number to the end of a string. */
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, double number);
/** Appends a boolean to the end of a string. */
JUCE_API String& JUCE_CALLTYPE operator<< (String& string1, bool boolean);
//==============================================================================
/** Case-sensitive comparison of two strings. */
JUCE_API bool JUCE_CALLTYPE operator== (const String& string1, const String& string2) noexcept;


Loading…
Cancel
Save