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.

See also:

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.

See also:

staticinlineisDigit(_r:GoInt32):Bool

IsDigit reports whether the rune is a decimal digit.

See also:

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.

See also:

staticinlineisLetter(_r:GoInt32):Bool

IsLetter reports whether the rune is a letter (category L).

See also:

staticinlineisLower(_r:GoInt32):Bool

IsLower reports whether the rune is a lower case letter.

See also:

staticinlineisMark(_r:GoInt32):Bool

IsMark reports whether the rune is a mark character (category M).

See also:

staticinlineisNumber(_r:GoInt32):Bool

IsNumber reports whether the rune is a number (category N).

See also:

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.

See also:

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.

See also:

staticinlineisPunct(_r:GoInt32):Bool

IsPunct reports whether the rune is a Unicode punctuation character (category P).

See also:

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.

See also:

staticinlineisSymbol(_r:GoInt32):Bool

IsSymbol reports whether the rune is a symbolic character.

See also:

staticinlineisTitle(_r:GoInt32):Bool

IsTitle reports whether the rune is a title case letter.

See also:

staticinlineisUpper(_r:GoInt32):Bool

IsUpper reports whether the rune is an upper case letter.

See also:

staticinlineis_(_rangeTab:Ref<RangeTable>, _r:GoInt32):Bool

Is reports whether the rune is in the specified table of ranges.

See also:

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

See also:

staticinlineto(__case:GoInt, _r:GoInt32):GoInt32

To maps the rune to the specified case: UpperCase, LowerCase, or TitleCase.

See also:

staticinlinetoLower(_r:GoInt32):GoInt32

ToLower maps the rune to lower case.

See also:

staticinlinetoTitle(_r:GoInt32):GoInt32

ToTitle maps the rune to title case.

See also:

staticinlinetoUpper(_r:GoInt32):GoInt32

ToUpper maps the rune to upper case.

See also: