Character properties v0.1.0

Source
The canonical combining class and the White_Space, Alphabetic and Numeric properties of a scalar value.

CombiningClassOf

pub func CombiningClassOf(scalar: char32) -> uint32

The canonical combining class of scalar: zero for nearly everything, and the reordering key for marks.

Source

Parameters

NameTypeDescription
scalarchar32the 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.

Source

Parameters

NameTypeDescription
scalarchar32the 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.

Source

Parameters

NameTypeDescription
scalarchar32the 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.

Source

Parameters

NameTypeDescription
scalarchar32the scalar value to test

Returns: whether it has the Numeric_Type property