JUCE
Classes | Functions | Variables
juce_NewLine.h File Reference

Classes

class  NewLine
 This class is used for represent a new-line character sequence. More...
 

Functions

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)
 

Variables

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

Function Documentation

§ operator<<()

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+=()

String& operator+= ( String s1,
const NewLine  
)

§ operator+() [1/3]

String operator+ ( const NewLine ,
const NewLine  
)

References NewLine::getDefault().

§ operator+() [2/3]

String operator+ ( String  s1,
const NewLine  
)

References NewLine::getDefault().

§ operator+() [3/3]

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

References NewLine::getDefault().

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 NewLine::operator StringRef(), and CppTokeniserFunctions::writeEscapeChars().