CompareInfo.IsSortable 方法
定義
指出指定的 Unicode 字元或字串是否可排序。Indicates whether a specified Unicode character or string is sortable.
多載
IsSortable(Rune) |
指出指定的 Rune 是否可排序。Indicates whether a specified Rune is sortable. |
IsSortable(String) |
指出指定的 Unicode 字串是否可排序。Indicates whether a specified Unicode string is sortable. |
IsSortable(ReadOnlySpan<Char>) |
指出指定的 Unicode 唯讀字元範圍是否可排序。Indicates whether a specified Unicode read-only span of characters is sortable. |
IsSortable(Char) |
指出指定的 Unicode 字元是否可排序。Indicates whether a specified Unicode character is sortable. |
IsSortable(Rune)
public:
static bool IsSortable(System::Text::Rune value);
public static bool IsSortable (System.Text.Rune value);
static member IsSortable : System.Text.Rune -> bool
Public Shared Function IsSortable (value As Rune) As Boolean
參數
- value
- Rune
Unicode 純量值。A Unicode scalar value.
傳回
若 value
是可排序的 Unicode 純量值,則為 true
;否則為 false
。true
if value
is a sortable Unicode scalar value; otherwise, false
.
適用於
IsSortable(String)
指出指定的 Unicode 字串是否可排序。Indicates whether a specified Unicode string is sortable.
public:
static bool IsSortable(System::String ^ text);
public static bool IsSortable (string text);
[System.Runtime.InteropServices.ComVisible(false)]
public static bool IsSortable (string text);
static member IsSortable : string -> bool
[<System.Runtime.InteropServices.ComVisible(false)>]
static member IsSortable : string -> bool
Public Shared Function IsSortable (text As String) As Boolean
參數
- text
- String
零或更多 Unicode 字元的字串。A string of zero or more Unicode characters.
傳回
如果 str
參數不是空字串 (""),且 str
中所有的 Unicode 字元都是可排序的,則為 true
,否則為 false
。true
if the str
parameter is not an empty string ("") and all the Unicode characters in str
are sortable; otherwise, false
.
- 屬性
例外狀況
str
為 null
。str
is null
.
備註
參數中的每個 Unicode 字元 str
都是由一或多個 utf-16 編碼 Char 物件表示。Each Unicode character in the str
parameter is represented by one or more UTF-16 encoded Char objects. str
如果內部類別排序表中定義了每個 Unicode 字元 CompareInfo ,而且不是私用或不成對的高或低代理字元,則參數可排序。The str
parameter is sortable if each Unicode character is defined in an internal CompareInfo class sort table, and is not a private use or unpaired high or low surrogate character.
適用於
IsSortable(ReadOnlySpan<Char>)
指出指定的 Unicode 唯讀字元範圍是否可排序。Indicates whether a specified Unicode read-only span of characters is sortable.
public:
static bool IsSortable(ReadOnlySpan<char> text);
public static bool IsSortable (ReadOnlySpan<char> text);
static member IsSortable : ReadOnlySpan<char> -> bool
Public Shared Function IsSortable (text As ReadOnlySpan(Of Char)) As Boolean
參數
- text
- ReadOnlySpan<Char>
零或多個 Unicode 字元的唯讀字元範圍。A read-only span of characters of zero or more Unicode characters.
傳回
若 text
不是空白,則為 true
;否則為 false
。true
if text
is non-empty and contains only sortable Unicode characters; otherwise, false
.
適用於
IsSortable(Char)
指出指定的 Unicode 字元是否可排序。Indicates whether a specified Unicode character is sortable.
public:
static bool IsSortable(char ch);
public static bool IsSortable (char ch);
[System.Runtime.InteropServices.ComVisible(false)]
public static bool IsSortable (char ch);
static member IsSortable : char -> bool
[<System.Runtime.InteropServices.ComVisible(false)>]
static member IsSortable : char -> bool
Public Shared Function IsSortable (ch As Char) As Boolean
參數
- ch
- Char
Unicode 字元。A Unicode character.
傳回
如果 ch
參數可排序,則為 true
,否則為 false
。true
if the ch
parameter is sortable; otherwise, false
.
- 屬性
備註
ch
如果參數是內部類別排序表中定義的 Unicode 字元 CompareInfo ,而且不是私用或不成對的高或低代理字元,則此參數可排序。The ch
parameter is sortable if it is a Unicode character that is defined in an internal CompareInfo class sort table, and is not a private use or unpaired high or low surrogate character.