tango.text.locale.Collation

License:

BSD style: see license.txt

Version:

Initial release: 2005

Author:

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.

Params:

cultureA Culture instance whose rules are used to compare strings.
ignoreCasetrue to perform case-insensitive comparisons; false to perform case-sensitive comparisions.
int compare(char[] strA, char[] strB) [public] #
Compares two strings and returns the sort order.

Returns:

-1 is strA is less than strB; 0 if strA is equal to strB; 1 if strA is greater than strB.

Params:

strAA string to compare to strB.
strBA string to compare to strA.
bool equals(char[] strA, char[] strB) [public] #
Indicates whether the two strings are equal.

Returns:

true if strA and strB are equal; otherwise, false.

Params:

strAA string to compare to strB.
strBA 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.

Returns:

A new StringComparer instance.
StringComparer currentCultureIgnoreCase() [public, static] #
Property. Retrieves an instance that performs case-insensitive comparisons using the rules of the current culture.

Returns:

A new StringComparer instance.
StringComparer invariantCulture() [public, static] #
Property. Retrieves an instance that performs case-sensitive comparisons using the rules of the invariant culture.

Returns:

A new StringComparer instance.
StringComparer invariantCultureIgnoreCase() [public, static] #
Property. Retrieves an instance that performs case-insensitive comparisons using the rules of the invariant culture.

Returns:

A new StringComparer instance.
alias int delegate(char[], char[]) StringComparison #
Delegate. Represents the method that will handle the string comparison.

Remarks:

The delegate has the signature int delegate(char[], 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.

Params:

comparerThe StringComparer to use when comparing strings. Optional.
this(StringComparison comparison) [public] #
Creates an instance using the specified delegate.

Params:

comparisonThe delegate to use when comparing strings.

Remarks:

The comparison parameter must have the same signature as StringComparison.
void sort(ref char[][] array) [public] #
Sorts all the elements in an array.

Params:

arrayThe array of strings to _sort.
void sort(ref char[][] array, int index, int count) [public] #
Sorts a range of the elements in an array.

Params:

arrayThe array of strings to _sort.
indexThe starting index of the range.
countThe number of elements in the range.
StringSorter currentCulture() [public, static] #
Property. Retrieves an instance that performs a case-sensitive sort using the rules of the current culture.

Returns:

A StringSorter instance.
StringSorter currentCultureIgnoreCase() [public, static] #
Property. Retrieves an instance that performs a case-insensitive sort using the rules of the current culture.

Returns:

A StringSorter instance.
StringSorter invariantCulture() [public, static] #
Property. Retrieves an instance that performs a case-sensitive sort using the rules of the invariant culture.

Returns:

A StringSorter instance.
StringSorter invariantCultureIgnoreCase() [public, static] #
Property. Retrieves an instance that performs a case-insensitive sort using the rules of the invariant culture.

Returns:

A StringSorter instance.