Rune.IsNumber(Rune) Method

Definition

返回一个值,该值指示指定的 rune 是否属于数字类别。Returns a value that indicates whether the specified rune is categorized as a number.

public:
 static bool IsNumber(System::Text::Rune value);
public static bool IsNumber (System.Text.Rune value);
static member IsNumber : System.Text.Rune -> bool
Public Shared Function IsNumber (value As Rune) As Boolean

Parameters

value
Rune

要计算的 rune。The rune to evaluate.

Returns

Boolean

如果 true 是一个数字,则为 value;否则为 falsetrue if value is a number; otherwise, false.

Remarks

此方法等效于查询 GetUnicodeCategory(Rune),并将结果与 DecimalDigitNumberLetterNumberOtherNumber的任何值进行比较。This method is equivalent to querying GetUnicodeCategory(Rune) and comparing the result against any of the values DecimalDigitNumber, LetterNumber, and OtherNumber.

有关详细信息,请参阅 Char.IsNumberFor more information, see Char.IsNumber.

Applies to