Collator.GetCollationKey(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將字串轉換為適合高效重複比較的 CollationKey。
[Android.Runtime.Register("getCollationKey", "(Ljava/lang/String;)Landroid/icu/text/CollationKey;", "GetGetCollationKey_Ljava_lang_String_Handler", ApiSince=24)]
public abstract Android.Icu.Text.CollationKey? GetCollationKey(string? source);
[<Android.Runtime.Register("getCollationKey", "(Ljava/lang/String;)Landroid/icu/text/CollationKey;", "GetGetCollationKey_Ljava_lang_String_Handler", ApiSince=24)>]
abstract member GetCollationKey : string -> Android.Icu.Text.CollationKey
參數
- source
- String
將字串轉換成 CollationKey。
傳回
根據該排序器的排序規則,為給定字串的 CollationKey 提供資料。 若原始字串為空,則回傳一個空的 CollationKey。
- 屬性
備註
將字串轉換為適合高效重複比較的 CollationKey。 所得的密鑰取決於彙總者的規則、強度與分解模式。
請注意,彙整鍵通常不如單純做比較效率。 更多細節請參閱加護病房使用者指南。
更多資訊請參閱 CollationKey 類別文件。
Java 文件 android.icu.text.Collator.getCollationKey(java.lang.String)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。