語言

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 提供資料。 若原始字串為空,則回傳一個空的 CollationKey。

屬性

備註

將字串轉換成一系列位元,可與其他 CollationKey 逐位比較。 當字串涉及多項比較時,CollationKeys 的效能優於 Collator.compare。 請參考 Collator 類別描述,範例使用 CollationKeys。

java.text.Collator.getCollationKey(java.lang.String)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於