Collator.GetCollationKey(String) 方法

定义

将字符串转换为可以按位与其他 CollationKey 进行比较的一系列位。

[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

参数

source
String

要转换为排序规则键的字符串。

返回

基于此排序规则排序规则的给定字符串的 CollationKey。 如果源字符串为 null,则返回 null CollationKey。

属性

注解

将字符串转换为可以按位与其他 CollationKey 进行比较的一系列位。 当字符串涉及多个比较时,CollationKeys 提供比 Collator.compare 更好的性能。 有关使用 CollationKeys 的示例,请参阅 Collator 类说明。

Java文档java.text.Collator.getCollationKey(java.lang.String)

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于