isDirSeparator

Determines whether the given character is a directory separator.

On Windows, this includes both `\` and `/`. On POSIX, it's just `/`.

@safe pure nothrow @nogc
bool
isDirSeparator
(
dchar c
)

Examples

version (Windows)
{
    assert( '/'.isDirSeparator);
    assert( '\\'.isDirSeparator);
}
else
{
    assert( '/'.isDirSeparator);
    assert(!'\\'.isDirSeparator);
}

Meta