Detailed Description

Namespaces

 internal
 

Classes

struct  Base64
 Contains some static methods for converting between binary and the standard base-64 encoding format. More...
 
struct  internal::make_unsigned< Type >
 
struct  internal::make_unsigned< signed char >
 
struct  internal::make_unsigned< char >
 
struct  internal::make_unsigned< short >
 
struct  internal::make_unsigned< int >
 
struct  internal::make_unsigned< long >
 
struct  internal::make_unsigned< long long >
 
class  CharacterFunctions
 A collection of functions for manipulating characters and character strings. More...
 
struct  CharacterFunctions::HexParser< ResultType >
 
class  CharPointer_ASCII
 Wraps a pointer to a null-terminated ASCII character string, and provides various methods to operate on the data. More...
 
class  CharPointer_UTF16
 Wraps a pointer to a null-terminated UTF-16 character string, and provides various methods to operate on the data. More...
 
class  CharPointer_UTF32
 Wraps a pointer to a null-terminated UTF-32 character string, and provides various methods to operate on the data. More...
 
class  CharPointer_UTF8
 Wraps a pointer to a null-terminated UTF-8 character string, and provides various methods to operate on the data. More...
 
class  Identifier
 Represents a string identifier, designed for accessing properties by name. More...
 
class  LocalisedStrings
 Used to convert strings to localised foreign-language versions. More...
 
class  NewLine
 This class is used for represent a new-line character sequence. More...
 
class  String
 The JUCE String class! More...
 
struct  std::hash< juce::String >
 
class  StringArray
 A special array for holding a list of strings. More...
 
class  StringPairArray
 A container for holding a set of strings which are keyed by another string. More...
 
class  StringPool
 A StringPool holds a set of shared strings, which reduces storage overheads and improves comparison speed when dealing with many duplicate strings. More...
 
class  StringRef
 A simple class for holding temporary references to a string literal or String. More...
 
class  TextDiff
 Calculates and applies a sequence of changes to convert one text string into another. More...
 
struct  TextDiff::Change
 Describes a change, which can be either an insertion or deletion. More...
 

Macros

#define JUCE_NATIVE_WCHAR_IS_UTF8   0
 This macro will be set to 1 if the compiler's native wchar_t is an 8-bit type. More...
 
#define JUCE_NATIVE_WCHAR_IS_UTF16   0
 This macro will be set to 1 if the compiler's native wchar_t is a 16-bit type. More...
 
#define JUCE_NATIVE_WCHAR_IS_UTF32   1
 This macro will be set to 1 if the compiler's native wchar_t is a 32-bit type. More...
 
#define TRANS(stringLiteral)   juce::translate (stringLiteral)
 Uses the LocalisedStrings class to translate the given string literal. More...
 
#define NEEDS_TRANS(stringLiteral)   (stringLiteral)
 A dummy version of the TRANS macro, used to indicate a string literal that should be added to the translation file by source-code scanner tools. More...
 

Typedefs

typedef wchar_t juce_wchar
 A platform-independent 32-bit unicode character type. More...
 

Functions

JUCE_API String translate (const String &stringLiteral)
 Uses the LocalisedStrings class to translate the given string literal. More...
 
JUCE_API String translate (const char *stringLiteral)
 Uses the LocalisedStrings class to translate the given string literal. More...
 
JUCE_API String translate (CharPointer_UTF8 stringLiteral)
 Uses the LocalisedStrings class to translate the given string literal. More...
 
JUCE_API String translate (const String &stringLiteral, const String &resultIfNotFound)
 Uses the LocalisedStrings class to translate the given string literal. More...
 
Stringoperator<< (String &string1, const NewLine &)
 Writes a new-line sequence to a string. More...
 
Stringoperator+= (String &s1, const NewLine &)
 
String operator+ (const NewLine &, const NewLine &)
 
String operator+ (String s1, const NewLine &)
 
String operator+ (const NewLine &, const char *s2)
 
JUCE_API String JUCE_CALLTYPE operator+ (const char *string1, const String &string2)
 Concatenates two strings. More...
 
JUCE_API String JUCE_CALLTYPE operator+ (const wchar_t *string1, const String &string2)
 Concatenates two strings. More...
 
JUCE_API String JUCE_CALLTYPE operator+ (char string1, const String &string2)
 Concatenates two strings. More...
 
JUCE_API String JUCE_CALLTYPE operator+ (wchar_t string1, const String &string2)
 Concatenates two strings. More...
 
JUCE_API String JUCE_CALLTYPE operator+ (String string1, const String &string2)
 Concatenates two strings. More...
 
JUCE_API String JUCE_CALLTYPE operator+ (String string1, const char *string2)
 Concatenates two strings. More...
 
JUCE_API String JUCE_CALLTYPE operator+ (String string1, const wchar_t *string2)
 Concatenates two strings. More...
 
JUCE_API String JUCE_CALLTYPE operator+ (String string1, char characterToAppend)
 Concatenates two strings. More...
 
JUCE_API String JUCE_CALLTYPE operator+ (String string1, wchar_t characterToAppend)
 Concatenates two strings. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, char characterToAppend)
 Appends a character at the end of a string. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, wchar_t characterToAppend)
 Appends a character at the end of a string. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, const char *string2)
 Appends a string to the end of the first one. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, const wchar_t *string2)
 Appends a string to the end of the first one. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, const String &string2)
 Appends a string to the end of the first one. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, StringRef string2)
 Appends a string to the end of the first one. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, uint8 number)
 Appends a decimal number to the end of a string. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, short number)
 Appends a decimal number to the end of a string. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, int number)
 Appends a decimal number to the end of a string. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, long number)
 Appends a decimal number to the end of a string. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, unsigned long number)
 Appends a decimal number to the end of a string. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, int64 number)
 Appends a decimal number to the end of a string. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, uint64 number)
 Appends a decimal number to the end of a string. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, float number)
 Appends a decimal number to the end of a string. More...
 
JUCE_API String &JUCE_CALLTYPE operator<< (String &string1, double number)
 Appends a decimal number to the end of a string. More...
 
String &JUCE_CALLTYPE operator<< (String &, bool)=delete
 
JUCE_API bool JUCE_CALLTYPE operator== (const String &string1, const String &string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator== (const String &string1, const char *string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator== (const String &string1, const wchar_t *string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator== (const String &string1, CharPointer_UTF8 string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator== (const String &string1, CharPointer_UTF16 string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator== (const String &string1, CharPointer_UTF32 string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator!= (const String &string1, const String &string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator!= (const String &string1, const char *string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator!= (const String &string1, const wchar_t *string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator!= (const String &string1, CharPointer_UTF8 string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator!= (const String &string1, CharPointer_UTF16 string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator!= (const String &string1, CharPointer_UTF32 string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator> (const String &string1, const String &string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator< (const String &string1, const String &string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator>= (const String &string1, const String &string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator<= (const String &string1, const String &string2) noexcept
 Case-sensitive comparison of two strings. More...
 
template<class traits >
std::basic_ostream< char, traits > &JUCE_CALLTYPE operator<< (std::basic_ostream< char, traits > &stream, const String &stringToWrite)
 This operator allows you to write a juce String directly to std output streams. More...
 
template<class traits >
std::basic_ostream< wchar_t, traits > &JUCE_CALLTYPE operator<< (std::basic_ostream< wchar_t, traits > &stream, const String &stringToWrite)
 This operator allows you to write a juce String directly to std output streams. More...
 
JUCE_API OutputStream &JUCE_CALLTYPE operator<< (OutputStream &stream, const String &stringToWrite)
 Writes a string to an OutputStream as UTF8. More...
 
JUCE_API OutputStream &JUCE_CALLTYPE operator<< (OutputStream &stream, StringRef stringToWrite)
 Writes a string to an OutputStream as UTF8. More...
 
JUCE_API bool JUCE_CALLTYPE operator== (const String &string1, StringRef string2) noexcept
 Case-sensitive comparison of two strings. More...
 
JUCE_API bool JUCE_CALLTYPE operator!= (const String &string1, StringRef string2) noexcept
 Case-sensitive comparison of two strings. More...
 
String operator+ (String s1, StringRef s2)
 
String operator+ (StringRef s1, const String &s2)
 
String operator+ (const char *s1, StringRef s2)
 
String operator+ (StringRef s1, const char *s2)
 

Variables

NewLine newLine
 A predefined object representing a new-line, which can be written to a string or stream. More...
 

Macro Definition Documentation

◆ JUCE_NATIVE_WCHAR_IS_UTF8

#define JUCE_NATIVE_WCHAR_IS_UTF8   0

This macro will be set to 1 if the compiler's native wchar_t is an 8-bit type.

◆ JUCE_NATIVE_WCHAR_IS_UTF16

#define JUCE_NATIVE_WCHAR_IS_UTF16   0

This macro will be set to 1 if the compiler's native wchar_t is a 16-bit type.

◆ JUCE_NATIVE_WCHAR_IS_UTF32

#define JUCE_NATIVE_WCHAR_IS_UTF32   1

This macro will be set to 1 if the compiler's native wchar_t is a 32-bit type.

◆ TRANS

#define TRANS (   stringLiteral)    juce::translate (stringLiteral)

Uses the LocalisedStrings class to translate the given string literal.

This macro is provided for backwards-compatibility, and just calls the translate() function. In new code, it's recommended that you just call translate() directly instead, and avoid using macros.

See also
translate(), LocalisedStrings

Referenced by StandalonePluginHolder::askUserToLoadState(), StandalonePluginHolder::askUserToSaveState(), StandaloneFilterWindow::buttonClicked(), and StandalonePluginHolder::showAudioSettingsDialog().

◆ NEEDS_TRANS

#define NEEDS_TRANS (   stringLiteral)    (stringLiteral)

A dummy version of the TRANS macro, used to indicate a string literal that should be added to the translation file by source-code scanner tools.

Wrapping a string literal in this macro has no effect, but by using it around strings that your app needs to translate at a later stage, it lets automatic code-scanning tools find this string and add it to the list of strings that need translation.

Typedef Documentation

◆ juce_wchar

typedef wchar_t juce_wchar

A platform-independent 32-bit unicode character type.

Function Documentation

◆ translate() [1/4]

JUCE_API String translate ( const String stringLiteral)

Uses the LocalisedStrings class to translate the given string literal.

See also
LocalisedStrings

Referenced by EdgeTable::getMaximumBounds().

◆ translate() [2/4]

JUCE_API String translate ( const char *  stringLiteral)

Uses the LocalisedStrings class to translate the given string literal.

See also
LocalisedStrings

◆ translate() [3/4]

JUCE_API String translate ( CharPointer_UTF8  stringLiteral)

Uses the LocalisedStrings class to translate the given string literal.

See also
LocalisedStrings

◆ translate() [4/4]

JUCE_API String translate ( const String stringLiteral,
const String resultIfNotFound 
)

Uses the LocalisedStrings class to translate the given string literal.

See also
LocalisedStrings

◆ operator<<() [1/21]

String& operator<< ( String string1,
const NewLine  
)

Writes a new-line sequence to a string.

You can use the predefined object 'newLine' to invoke this, e.g.

myString << "Hello World" << newLine << newLine;

References NewLine::getDefault().

◆ operator+=()

◆ operator+() [1/16]

String operator+ ( const NewLine ,
const NewLine  
)

References NewLine::getDefault().

◆ operator+() [2/16]

String operator+ ( String  s1,
const NewLine  
)

References NewLine::getDefault().

◆ operator+() [3/16]

String operator+ ( const NewLine ,
const char *  s2 
)

References NewLine::getDefault().

◆ operator+() [4/16]

JUCE_API String JUCE_CALLTYPE operator+ ( const char *  string1,
const String string2 
)

Concatenates two strings.

Referenced by String::getCharPointer().

◆ operator+() [5/16]

JUCE_API String JUCE_CALLTYPE operator+ ( const wchar_t *  string1,
const String string2 
)

Concatenates two strings.

◆ operator+() [6/16]

JUCE_API String JUCE_CALLTYPE operator+ ( char  string1,
const String string2 
)

Concatenates two strings.

◆ operator+() [7/16]

JUCE_API String JUCE_CALLTYPE operator+ ( wchar_t  string1,
const String string2 
)

Concatenates two strings.

◆ operator+() [8/16]

JUCE_API String JUCE_CALLTYPE operator+ ( String  string1,
const String string2 
)

Concatenates two strings.

◆ operator+() [9/16]

JUCE_API String JUCE_CALLTYPE operator+ ( String  string1,
const char *  string2 
)

Concatenates two strings.

◆ operator+() [10/16]

JUCE_API String JUCE_CALLTYPE operator+ ( String  string1,
const wchar_t *  string2 
)

Concatenates two strings.

◆ operator+() [11/16]

JUCE_API String JUCE_CALLTYPE operator+ ( String  string1,
char  characterToAppend 
)

Concatenates two strings.

◆ operator+() [12/16]

JUCE_API String JUCE_CALLTYPE operator+ ( String  string1,
wchar_t  characterToAppend 
)

Concatenates two strings.

◆ operator<<() [2/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
char  characterToAppend 
)

Appends a character at the end of a string.

Referenced by String::getCharPointer(), and operator<<().

◆ operator<<() [3/21]

JUCE_API String &JUCE_CALLTYPE operator<< ( String string1,
wchar_t  characterToAppend 
)

Appends a character at the end of a string.

◆ operator<<() [4/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
const char *  string2 
)

Appends a string to the end of the first one.

◆ operator<<() [5/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
const wchar_t *  string2 
)

Appends a string to the end of the first one.

◆ operator<<() [6/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
const String string2 
)

Appends a string to the end of the first one.

◆ operator<<() [7/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
StringRef  string2 
)

Appends a string to the end of the first one.

◆ operator<<() [8/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
uint8  number 
)

Appends a decimal number to the end of a string.

◆ operator<<() [9/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
short  number 
)

Appends a decimal number to the end of a string.

◆ operator<<() [10/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
int  number 
)

Appends a decimal number to the end of a string.

◆ operator<<() [11/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
long  number 
)

Appends a decimal number to the end of a string.

◆ operator<<() [12/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
unsigned long  number 
)

Appends a decimal number to the end of a string.

◆ operator<<() [13/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
int64  number 
)

Appends a decimal number to the end of a string.

◆ operator<<() [14/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
uint64  number 
)

Appends a decimal number to the end of a string.

◆ operator<<() [15/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
float  number 
)

Appends a decimal number to the end of a string.

◆ operator<<() [16/21]

JUCE_API String& JUCE_CALLTYPE operator<< ( String string1,
double  number 
)

Appends a decimal number to the end of a string.

◆ operator<<() [17/21]

String& JUCE_CALLTYPE operator<< ( String ,
bool   
)
delete

◆ operator==() [1/7]

JUCE_API bool JUCE_CALLTYPE operator== ( const String string1,
const String string2 
)
noexcept

Case-sensitive comparison of two strings.

Referenced by String::getCharPointer().

◆ operator==() [2/7]

JUCE_API bool JUCE_CALLTYPE operator== ( const String string1,
const char *  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator==() [3/7]

JUCE_API bool JUCE_CALLTYPE operator== ( const String string1,
const wchar_t *  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator==() [4/7]

JUCE_API bool JUCE_CALLTYPE operator== ( const String string1,
CharPointer_UTF8  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator==() [5/7]

JUCE_API bool JUCE_CALLTYPE operator== ( const String string1,
CharPointer_UTF16  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator==() [6/7]

JUCE_API bool JUCE_CALLTYPE operator== ( const String string1,
CharPointer_UTF32  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator!=() [1/7]

JUCE_API bool JUCE_CALLTYPE operator!= ( const String string1,
const String string2 
)
noexcept

Case-sensitive comparison of two strings.

Referenced by String::getCharPointer().

◆ operator!=() [2/7]

JUCE_API bool JUCE_CALLTYPE operator!= ( const String string1,
const char *  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator!=() [3/7]

JUCE_API bool JUCE_CALLTYPE operator!= ( const String string1,
const wchar_t *  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator!=() [4/7]

JUCE_API bool JUCE_CALLTYPE operator!= ( const String string1,
CharPointer_UTF8  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator!=() [5/7]

JUCE_API bool JUCE_CALLTYPE operator!= ( const String string1,
CharPointer_UTF16  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator!=() [6/7]

JUCE_API bool JUCE_CALLTYPE operator!= ( const String string1,
CharPointer_UTF32  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator>()

JUCE_API bool JUCE_CALLTYPE operator> ( const String string1,
const String string2 
)
noexcept

Case-sensitive comparison of two strings.

Referenced by String::getCharPointer(), and File::getFullPathName().

◆ operator<()

JUCE_API bool JUCE_CALLTYPE operator< ( const String string1,
const String string2 
)
noexcept

Case-sensitive comparison of two strings.

Referenced by String::getCharPointer(), File::getFullPathName(), and AudioChannelSet::intersect().

◆ operator>=()

JUCE_API bool JUCE_CALLTYPE operator>= ( const String string1,
const String string2 
)
noexcept

Case-sensitive comparison of two strings.

Referenced by String::getCharPointer().

◆ operator<=()

JUCE_API bool JUCE_CALLTYPE operator<= ( const String string1,
const String string2 
)
noexcept

Case-sensitive comparison of two strings.

Referenced by String::getCharPointer().

◆ operator<<() [18/21]

template<class traits >
std::basic_ostream<char, traits>& JUCE_CALLTYPE operator<< ( std::basic_ostream< char, traits > &  stream,
const String stringToWrite 
)

This operator allows you to write a juce String directly to std output streams.

This is handy for writing strings to std::cout, std::cerr, etc.

◆ operator<<() [19/21]

template<class traits >
std::basic_ostream<wchar_t, traits>& JUCE_CALLTYPE operator<< ( std::basic_ostream< wchar_t, traits > &  stream,
const String stringToWrite 
)

This operator allows you to write a juce String directly to std output streams.

This is handy for writing strings to std::wcout, std::wcerr, etc.

References JUCE_API, JUCE_CALLTYPE, and operator<<().

◆ operator<<() [20/21]

JUCE_API OutputStream& JUCE_CALLTYPE operator<< ( OutputStream stream,
const String stringToWrite 
)

Writes a string to an OutputStream as UTF8.

◆ operator<<() [21/21]

JUCE_API OutputStream& JUCE_CALLTYPE operator<< ( OutputStream stream,
StringRef  stringToWrite 
)

Writes a string to an OutputStream as UTF8.

◆ operator==() [7/7]

JUCE_API bool JUCE_CALLTYPE operator== ( const String string1,
StringRef  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator!=() [7/7]

JUCE_API bool JUCE_CALLTYPE operator!= ( const String string1,
StringRef  string2 
)
noexcept

Case-sensitive comparison of two strings.

◆ operator+() [13/16]

String operator+ ( String  s1,
StringRef  s2 
)

References StringRef::text.

◆ operator+() [14/16]

String operator+ ( StringRef  s1,
const String s2 
)

References StringRef::text.

◆ operator+() [15/16]

String operator+ ( const char *  s1,
StringRef  s2 
)

References StringRef::text.

◆ operator+() [16/16]

String operator+ ( StringRef  s1,
const char *  s2 
)

References StringRef::text.

Variable Documentation

◆ newLine

NewLine newLine

A predefined object representing a new-line, which can be written to a string or stream.

To write a new-line to a stream, you can use the predefined 'newLine' variable like this:

myOutputStream << "Hello World" << newLine << newLine;

Referenced by littlefoot::Program::getTotalSpaceNeeded(), NewLine::operator StringRef(), and CppTokeniserFunctions::writeEscapeChars().