< 0 if a < b, 0 if a == b, and > 0 if a > b.
assert(filenameCharCmp('a', 'a') == 0); assert(filenameCharCmp('a', 'b') < 0); assert(filenameCharCmp('b', 'a') > 0); version (linux) { // Same as calling filenameCharCmp!(CaseSensitive.yes)(a, b) assert(filenameCharCmp('A', 'a') < 0); assert(filenameCharCmp('a', 'A') > 0); } version (Windows) { // Same as calling filenameCharCmp!(CaseSensitive.no)(a, b) assert(filenameCharCmp('a', 'A') == 0); assert(filenameCharCmp('a', 'B') < 0); assert(filenameCharCmp('A', 'b') < 0); }
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.