Package unicode provides data and functions to test some properties of Unicode code points.
Static methods
staticinlinein_(_r:GoInt32, _ranges:Rest<Ref<RangeTable>>):Bool
In reports whether the rune is a member of one of the ranges.
staticinlineisControl(_r:GoInt32):Bool
IsControl reports whether the rune is a control character. The C (Other) Unicode category includes more code points such as surrogates; use Is(C, r) to test for them.
staticinlineisGraphic(_r:GoInt32):Bool
IsGraphic reports whether the rune is defined as a Graphic by Unicode. Such characters include letters, marks, numbers, punctuation, symbols, and spaces, from categories L, M, N, P, S, Zs.
staticinlineisMark(_r:GoInt32):Bool
IsMark reports whether the rune is a mark character (category M).
staticinlineisOneOf(_ranges:Slice<Ref<RangeTable>>, _r:GoInt32):Bool
IsOneOf reports whether the rune is a member of one of the ranges. The function "In" provides a nicer signature and should be used in preference to IsOneOf.
staticinlineisPrint(_r:GoInt32):Bool
IsPrint reports whether the rune is defined as printable by Go. Such characters include letters, marks, numbers, punctuation, symbols, and the ASCII space character, from categories L, M, N, P, S and the ASCII space character. This categorization is the same as IsGraphic except that the only spacing character is ASCII space, U+0020.
staticinlineisPunct(_r:GoInt32):Bool
IsPunct reports whether the rune is a Unicode punctuation character (category P).
staticinlineisSpace(_r:GoInt32):Bool
IsSpace reports whether the rune is a space character as defined by Unicode's White Space property; in the Latin-1 space this is
'\t', '\n', '\v', '\f', '\r', ' ', U+0085 (NEL), U+00A0 (NBSP).
Other definitions of spacing characters are set by category Z and property Pattern_White_Space.
staticinlineis_(_rangeTab:Ref<RangeTable>, _r:GoInt32):Bool
Is reports whether the rune is in the specified table of ranges.
staticinlinesimpleFold(_r:GoInt32):GoInt32
SimpleFold iterates over Unicode code points equivalent under the Unicode-defined simple case folding. Among the code points equivalent to rune (including rune itself), SimpleFold returns the smallest rune > r if one exists, or else the smallest rune >= 0. If r is not a valid Unicode code point, SimpleFold(r) returns r.
For example:
SimpleFold('A') = 'a'
SimpleFold('a') = 'A'
SimpleFold('K') = 'k'
SimpleFold('k') = '\u212A' (Kelvin symbol, K)
SimpleFold('\u212A') = 'K'
SimpleFold('1') = '1'
SimpleFold(-2) = -2