NewLine Class Reference
juce_core » text

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

## Public Member Functions

| operator String () const
| Returns the default new-line sequence that the library uses. More...
| operator StringRef () const noexcept
| Returns the default new-line sequence that the library uses. More...

## Static Public Member Functions

static const char * | getDefault () noexcept
| Returns the default new-line sequence that the library uses. More...

## Detailed Description

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

To write a new-line to a stream, you can use the predefined 'newLine' variable, e.g.

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

The exact character sequence that will be used for the new-line can be set and retrieved with OutputStream::setNewLineString() and OutputStream::getNewLineString().

## Member Function Documentation

## getDefault()

static const char* NewLine::getDefault | ( |  | ) |

static noexcept

Returns the default new-line sequence that the library uses.

See also
  OutputStream::setNewLineString()

Referenced by operator+(), operator+=(), and operator<<().

## operator String()

NewLine::operator String | ( |  | ) | const

Returns the default new-line sequence that the library uses.

See also
  getDefault()

## operator StringRef()

NewLine::operator StringRef | ( |  | ) | const

noexcept

Returns the default new-line sequence that the library uses.

See also
  OutputStream::setNewLineString()

The documentation for this class was generated from the following file:

- juce_NewLine.h

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