filenameCharCmp

fnint filenameCharCmp(CaseSensitive cs = CaseSensitive.osDefault)(dchar a, dchar b) @safe pure nothrow

Compares filename characters.

This function can perform a case-sensitive or a case-insensitive comparison. This is controlled through the cs template parameter which, if not specified, is given by CaseSensitive.osDefault.

On Windows, the backslash and slash characters (`\` and `/`) are considered equal.

Parameters

csCase-sensitivity of the comparison.
aA filename character.
bA filename character.

Returns

< 0 if a < b,

0 if a == b, and

> 0 if a > b.