natcmp

Undocumented in source.

Members

Functions

clamp
T clamp(T val, T lesser, T greater)
Undocumented in source. Be warned that the author may not have intended to support it.
compareNatural
int compareNatural(dchar[] a, dchar[] b)

Compares two strings in a way that is natural to humans. Integers come before non-integers, and integers are compared as if they were numbers instead of strings of characters. Intended for usage in opCmp overloads.

compareNatural
int compareNatural(char[] a, char[] b)

Overload for 8-bit strings

compareNatural
int compareNatural(wchar[] a, wchar[] b)

Overload for 16-bit strings

compareNaturalSort
bool compareNaturalSort(inout(dchar[]) a, inout(dchar[]) b)

Natural string comparison function for use with phobos's sorting algorithm

compareNaturalSort
bool compareNaturalSort(inout(char[]) a, inout(char[]) b)

Overload for 8-bit strings

compareNaturalSort
bool compareNaturalSort(inout(wchar[]) a, inout(wchar[]) b)

Overload for 16-bit strings

comparePathsNatural
int comparePathsNatural(dchar[] pathA, dchar[] pathB)

Compares path strings naturally. Comparing paths naturally requires path separators to be treated specially. Intended for usage in opCmp overloads.

comparePathsNatural
int comparePathsNatural(inout(char[]) pathA, inout(char[]) pathB)

Overload for 8-bit strings

comparePathsNatural
int comparePathsNatural(inout(wchar[]) pathA, inout(wchar[]) pathB)

Overload for 16-bit strings

comparePathsNaturalSort
bool comparePathsNaturalSort(inout(char[]) a, inout(char[]) b)

Overload for 8-bit strings

comparePathsNaturalSort
bool comparePathsNaturalSort(inout(dchar[]) a, inout(dchar[]) b)

Path comparison function for use with phobos's sorting algorithm

comparePathsNaturalSort
bool comparePathsNaturalSort(inout(wchar[]) a, inout(wchar[]) b)

Overload for 16-bit strings

Meta