CompareInfo.IsSortable Method

Definition

Indicates whether a specified Unicode character or string is sortable.

Overloads

IsSortable(Rune)

Indicates whether a specified Rune is sortable.

IsSortable(String)

Indicates whether a specified Unicode string is sortable.

IsSortable(ReadOnlySpan<Char>)

Indicates whether a specified Unicode read-only span of characters is sortable.

IsSortable(Char)

Indicates whether a specified Unicode character is sortable.

IsSortable(Rune)

Source:
CompareInfo.cs
Source:
CompareInfo.cs
Source:
CompareInfo.cs

Indicates whether a specified Rune is sortable.

C#
public static bool IsSortable(System.Text.Rune value);

Parameters

value
Rune

A Unicode scalar value.

Returns

true if value is a sortable Unicode scalar value; otherwise, false.

Applies to

.NET 10 and other versions
Product Versions
.NET 5, 6, 7, 8, 9, 10

IsSortable(String)

Source:
CompareInfo.cs
Source:
CompareInfo.cs
Source:
CompareInfo.cs

Indicates whether a specified Unicode string is sortable.

C#
public static bool IsSortable(string text);
C#
[System.Runtime.InteropServices.ComVisible(false)]
public static bool IsSortable(string text);

Parameters

text
String

A string of zero or more Unicode characters.

Returns

true if the text parameter is not an empty string ("") and all the Unicode characters in text are sortable; otherwise, false.

Attributes

Exceptions

text is null.

Remarks

Each Unicode character in the str parameter is represented by one or more UTF-16 encoded Char objects. 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.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

IsSortable(ReadOnlySpan<Char>)

Source:
CompareInfo.cs
Source:
CompareInfo.cs
Source:
CompareInfo.cs

Indicates whether a specified Unicode read-only span of characters is sortable.

C#
public static bool IsSortable(ReadOnlySpan<char> text);

Parameters

text
ReadOnlySpan<Char>

A read-only span of characters of zero or more Unicode characters.

Returns

true if text is non-empty and contains only sortable Unicode characters; otherwise, false.

Applies to

.NET 10 and other versions
Product Versions
.NET 5, 6, 7, 8, 9, 10

IsSortable(Char)

Source:
CompareInfo.cs
Source:
CompareInfo.cs
Source:
CompareInfo.cs

Indicates whether a specified Unicode character is sortable.

C#
public static bool IsSortable(char ch);
C#
[System.Runtime.InteropServices.ComVisible(false)]
public static bool IsSortable(char ch);

Parameters

ch
Char

A Unicode character.

Returns

true if the ch parameter is sortable; otherwise, false.

Attributes

Remarks

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.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1