Share via


Collator.GetCollationKey(String) Method

Definition

Transforms the String into a series of bits that can be compared bitwise to other CollationKeys.

[Android.Runtime.Register("getCollationKey", "(Ljava/lang/String;)Ljava/text/CollationKey;", "GetGetCollationKey_Ljava_lang_String_Handler")]
public abstract Java.Text.CollationKey? GetCollationKey (string? source);
[<Android.Runtime.Register("getCollationKey", "(Ljava/lang/String;)Ljava/text/CollationKey;", "GetGetCollationKey_Ljava_lang_String_Handler")>]
abstract member GetCollationKey : string -> Java.Text.CollationKey

Parameters

source
String

the string to be transformed into a collation key.

Returns

the CollationKey for the given String based on this Collator's collation rules. If the source String is null, a null CollationKey is returned.

Attributes

Remarks

Transforms the String into a series of bits that can be compared bitwise to other CollationKeys. CollationKeys provide better performance than Collator.compare when Strings are involved in multiple comparisons. See the Collator class description for an example using CollationKeys.

Java documentation for java.text.Collator.getCollationKey(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to