Initial release: 2005
John Chapman
- class StringComparer [public] ¶
-
Compares strings using the specified case and cultural comparision rules.
- this(Culture culture, bool ignoreCase) [public] ¶
-
Creates an instance that compares strings using the rules of the specified culture.
culture | A Culture instance whose rules are used to compare strings. |
ignoreCase | true to perform case-insensitive comparisons; false to perform case-sensitive comparisions. |
- int compare(const(char)[] strA, const(char)[] strB) [public] ¶
-
Compares two strings and returns the sort order.
-1 is strA is less than strB; 0 if strA is equal to strB; 1 if strA is greater than strB.
strA | A string to compare to strB. |
strB | A string to compare to strA. |
- bool equals(const(char)[] strA, const(char)[] strB) [public] ¶
-
Indicates whether the two strings are equal.
true if strA and strB are equal; otherwise, false.
strA | A string to compare to strB. |
strB | A string to compare to strA. |
- StringComparer currentCulture() [public, static] ¶
-
Property. Retrieves an instance that performs case-sensitive comparisons using the rules of the current culture.
A new StringComparer instance.
- StringComparer currentCultureIgnoreCase() [public, static] ¶
-
Property. Retrieves an instance that performs case-insensitive comparisons using the rules of the current culture.
A new StringComparer instance.
- StringComparer invariantCulture() [public, static] ¶
-
Property. Retrieves an instance that performs case-sensitive comparisons using the rules of the invariant culture.
A new StringComparer instance.
- StringComparer invariantCultureIgnoreCase() [public, static] ¶
-
Property. Retrieves an instance that performs case-insensitive comparisons using the rules of the invariant culture.
A new StringComparer instance.
- alias int delegate(const(char)[], const(char)[]) StringComparison ¶
-
Delegate. Represents the method that will handle the string comparison.
The delegate has the signature int delegate(const(char)[], const(char)[]).
- class StringSorter [public] ¶
-
Sorts strings according to the rules of the specified culture.
- this(StringComparer comparer = null) [public] ¶
-
Creates an instance using the specified StringComparer.
comparer | The StringComparer to use when comparing strings. Optional. |
- this(StringComparison comparison) [public] ¶
-
Creates an instance using the specified delegate.
comparison | The delegate to use when comparing strings. |
The comparison parameter must have the same signature as StringComparison.
- inout(void) sort(ref inout(char)[][] array) [public] ¶
-
Sorts all the elements in an array.
array | The array of strings to _sort. |
- inout(void) sort(ref inout(char)[][] array, size_t index, size_t count) [public] ¶
-
Sorts a range of the elements in an array.
array | The array of strings to _sort. |
index | The starting index of the range. |
count | The number of elements in the range. |
- StringSorter currentCulture() [public, @property, static] ¶
-
Property. Retrieves an instance that performs a case-sensitive sort using the rules of the current culture.
A StringSorter instance.
- StringSorter currentCultureIgnoreCase() [public, @property, static] ¶
-
Property. Retrieves an instance that performs a case-insensitive sort using the rules of the current culture.
A StringSorter instance.
- StringSorter invariantCulture() [public, static] ¶
-
Property. Retrieves an instance that performs a case-sensitive sort using the rules of the invariant culture.
A StringSorter instance.
- StringSorter invariantCultureIgnoreCase() [public, static] ¶
-
Property. Retrieves an instance that performs a case-insensitive sort using the rules of the invariant culture.
A StringSorter instance.