Character properties v0.1.0
CombiningClassOf
pub func CombiningClassOf(scalar: char32) -> uint32
The canonical combining class of scalar: zero for nearly everything, and the reordering key for marks.
Parameters
| Name | Type | Description |
|---|---|---|
scalar | char32 | the scalar value to classify |
Returns: its canonical combining class, zero for a starter
IsWhiteSpace
pub func IsWhiteSpace(scalar: char32) -> bool
Whether scalar is whitespace by Unicode's White_Space property.
A superset of ASCII's six: the no-break spaces, the typographic spaces and the line and paragraph separators
are all here, which is what separates this from Text's deliberately ASCII-only trimming.
Parameters
| Name | Type | Description |
|---|---|---|
scalar | char32 | the scalar value to test |
Returns: whether it has the White_Space property
IsAlphabetic
pub func IsAlphabetic(scalar: char32) -> bool
Whether scalar is alphabetic by the derived Alphabetic property.
Parameters
| Name | Type | Description |
|---|---|---|
scalar | char32 | the scalar value to test |
Returns: whether it has the Alphabetic property
IsNumeric
pub func IsNumeric(scalar: char32) -> bool
Whether scalar is numeric: a decimal digit, a letterlike number, or another number form.
Parameters
| Name | Type | Description |
|---|---|---|
scalar | char32 | the scalar value to test |
Returns: whether it has the Numeric_Type property