Documentation ¶
Overview ¶
Package runes provides functions to test some properties of Unicode code points.
Index ¶
- func IsControl(r rune) bool
- func IsDigit(r rune) bool
- func IsDigitUnsafe(r rune) bool
- func IsGraphic(r rune) bool
- func IsGraphicUnsafe(r rune) bool
- func IsLetter(r rune) bool
- func IsLetterUnsafe(r rune) bool
- func IsLower(r rune) bool
- func IsLowerUnsafe(r rune) bool
- func IsMark(r rune) bool
- func IsMarkUnsafe(r rune) bool
- func IsNumber(r rune) bool
- func IsNumberUnsafe(r rune) bool
- func IsPrint(r rune) bool
- func IsPrintUnsafe(r rune) bool
- func IsPunct(r rune) bool
- func IsPunctUnsafe(r rune) bool
- func IsSpace(r rune) bool
- func IsSpaceUnsafe(r rune) bool
- func IsSymbol(r rune) bool
- func IsSymbolUnsafe(r rune) bool
- func IsTitle(r rune) bool
- func IsTitleUnsafe(r rune) bool
- func IsUpper(r rune) bool
- func IsUpperUnsafe(r rune) bool
- func SimpleFold(r rune) rune
- func SimpleFoldUnsafe(r rune) rune
- func To(_case int, r rune) rune
- func ToLower(r rune) rune
- func ToLowerUnsafe(r rune) rune
- func ToTitle(r rune) rune
- func ToTitleUnsafe(r rune) rune
- func ToUnsafe(_case int, r rune) rune
- func ToUpper(r rune) rune
- func ToUpperUnsafe(r rune) rune
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsControl ¶
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.
func IsDigitUnsafe ¶
IsDigitUnsafe is the unsafe version of IsDigit.
func IsGraphic ¶
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.
func IsGraphicUnsafe ¶
IsGraphicUnsafe is the unsafe version of IsGraphic.
func IsLetterUnsafe ¶
IsLetterUnsafe is the unsafe version of IsLetter.
func IsLowerUnsafe ¶
IsLowerUnsafe is the unsafe version of IsLower.
func IsNumberUnsafe ¶
IsNumberUnsafe is the unsafe version of IsNumber.
func IsPrint ¶
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.
func IsPrintUnsafe ¶
IsPrintUnsafe is the unsafe version of IsPrint.
func IsPunctUnsafe ¶
IsPunctUnsafe is the unsafe version of IsPunct.
func IsSpace ¶
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.
func IsSpaceUnsafe ¶
IsSpaceUnsafe is the unsafe version of IsSpace.
func IsSymbolUnsafe ¶
IsSymbolUnsafe is the unsafe version of IsSymbol.
func IsTitleUnsafe ¶
IsTitleUnsafe is the unsafe version of IsTitle.
func IsUpperUnsafe ¶
IsUpperUnsafe is the unsafe version of IsUpper.
func SimpleFold ¶
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
func SimpleFoldUnsafe ¶
SimpleFoldUnsafe is the unsafe version of SimpleFold.
func ToLowerUnsafe ¶
ToLowerUnsafe is the unsafe version of ToLower.
func ToTitleUnsafe ¶
ToTitleUnsafe is the unsafe version of ToTitle.
func ToUpperUnsafe ¶
ToUpperUnsafe is the unsafe version of ToUpper.
Types ¶
This section is empty.