isNewline

This predicate indicates whether or not the given character is a newline character.

pure nothrow @nogc @safe
bool
isNewline
(
immutable dchar c
)

Parameters

c
Type: dchar

The character to test

Return Value

Type: bool

true if the character is a newline, false otherwise.

Examples

assert(isNewline('\n'));
assert(!isNewline('a'));
assert(!isNewline(' '));

Meta