case sensitivity
range for first file name
range for second file name
< 0 if filename1 < filename2, 0 if filename1 == filename2 and > 0 if filename1 > filename2.
assert(filenameCmp("abc", "abc") == 0); assert(filenameCmp("abc", "abd") < 0); assert(filenameCmp("abc", "abb") > 0); assert(filenameCmp("abc", "abcd") < 0); assert(filenameCmp("abcd", "abc") > 0); version (linux) { // Same as calling filenameCmp!(CaseSensitive.yes)(filename1, filename2) assert(filenameCmp("Abc", "abc") < 0); assert(filenameCmp("abc", "Abc") > 0); } version (Windows) { // Same as calling filenameCmp!(CaseSensitive.no)(filename1, filename2) assert(filenameCmp("Abc", "abc") == 0); assert(filenameCmp("abc", "Abc") == 0); assert(filenameCmp("Abc", "abD") < 0); assert(filenameCmp("abc", "AbB") > 0); }
Compares file names and returns
Individual characters are compared using filenameCharCmp!cs, where cs is an optional template parameter determining whether the comparison is case sensitive or not.
Treatment of invalid UTF encodings is implementation defined.