共用方式為


UCharacter.IsWhitespace(Int32) Method

Definition

Determines if the specified code point is a white space character.

[Android.Runtime.Register("isWhitespace", "(I)Z", "", ApiSince=24)]
public static bool IsWhitespace (int ch);
[<Android.Runtime.Register("isWhitespace", "(I)Z", "", ApiSince=24)>]
static member IsWhitespace : int -> bool

Parameters

ch
Int32

code point to determine if it is a white space

Returns

true if the specified code point is a white space character

Attributes

Remarks

Determines if the specified code point is a white space character. A code point is considered to be an whitespace character if and only if it satisfies one of the following criteria: <ul> <li> It is a Unicode Separator character (categories "Z" = "Zs" or "Zl" or "Zp"), but is not also a non-breaking space (&#92;u00A0 or &#92;u2007 or &#92;u202F). <li> It is &#92;u0009, HORIZONTAL TABULATION. <li> It is &#92;u000A, LINE FEED. <li> It is &#92;u000B, VERTICAL TABULATION. <li> It is &#92;u000C, FORM FEED. <li> It is &#92;u000D, CARRIAGE RETURN. <li> It is &#92;u001C, FILE SEPARATOR. <li> It is &#92;u001D, GROUP SEPARATOR. <li> It is &#92;u001E, RECORD SEPARATOR. <li> It is &#92;u001F, UNIT SEPARATOR. </ul>

This API tries to sync with the semantics of Java's java.lang.Character.isWhitespace(), but it may not return the exact same results because of the Unicode version difference.

Note: Unicode 4.0.1 changed U+200B ZERO WIDTH SPACE from a Space Separator (Zs) to a Format Control (Cf). Since then, isWhitespace(0x200b) returns false. See http://www.unicode.org/versions/Unicode4.0.1/

Java documentation for android.icu.lang.UCharacter.isWhitespace(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to