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

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.

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

References NewLine::getDefault().

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

References NewLine::getDefault().

String operator+ ( String  s1,
const NewLine  
)

References NewLine::getDefault().

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

References NewLine::getDefault().

Variable Documentation

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:

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

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