Documentation
¶
Overview ¶
Package unicode provides data and functions to test some properties of Unicode code points.
Based on the unicode package, with the following omissions:
- No IsGraphic.
- No IsMark.
- No IsNumber.
- No IsPrint.
- No IsPunct.
- No IsSymbol.
- No Properties.
- No Scripts.
- No SimpleFold.
- No SpecialCase.
Example (Is) ¶
Functions starting with "Is" can be used to inspect which table of range a rune belongs to. Note that runes may fit into more than one range.
package main
import (
"solod.dev/so/fmt"
"solod.dev/so/unicode"
)
func main() {
// constant with mixed type runes
const mixed = "\b5Ὂg̀9! ℃ᾭG"
for _, c := range mixed {
fmt.Printf("For %q:\n", c)
if unicode.IsControl(c) {
fmt.Println("\tis control rune")
}
if unicode.IsDigit(c) {
fmt.Println("\tis digit rune")
}
if unicode.IsLetter(c) {
fmt.Println("\tis letter rune")
}
if unicode.IsLower(c) {
fmt.Println("\tis lower case rune")
}
if unicode.IsSpace(c) {
fmt.Println("\tis space rune")
}
if unicode.IsTitle(c) {
fmt.Println("\tis title case rune")
}
if unicode.IsUpper(c) {
fmt.Println("\tis upper case rune")
}
}
}
Output: For '\b': is control rune For '5': is digit rune For 'Ὂ': is letter rune is upper case rune For 'g': is letter rune is lower case rune For '̀': For '9': is digit rune For '!': For ' ': is space rune For '℃': For 'ᾭ': is letter rune is title case rune For 'G': is letter rune is upper case rune
Index ¶
- Constants
- Variables
- func In(r rune, ranges ...*RangeTable) bool
- func Is(rangeTab *RangeTable, r rune) bool
- func IsControl(r rune) bool
- func IsDigit(r rune) bool
- func IsLetter(r rune) bool
- func IsLower(r rune) bool
- func IsSpace(r rune) bool
- func IsTitle(r rune) bool
- func IsUpper(r rune) bool
- func To(_case int, r rune) rune
- func ToLower(r rune) rune
- func ToTitle(r rune) rune
- func ToUpper(r rune) rune
- type CaseRange
- type D
- type Range16
- type Range32
- type RangeTable
Examples ¶
Constants ¶
const ( MaxRune = '\U0010FFFF' // Maximum valid Unicode code point. ReplacementChar = '\uFFFD' // Represents invalid code points. MaxASCII = '\x7f' // maximum ASCII value. MaxLatin1 = '\u00FF' // maximum Latin-1 value. )
const ( UpperCase = iota LowerCase TitleCase MaxCase )
Indices into the Delta arrays inside CaseRanges for case mapping.
const (
UpperLower = MaxRune + 1 // (Cannot be a valid delta.)
)
If the Delta field of a CaseRange is UpperLower, it means this CaseRange represents a sequence of the form (say) Upper Lower Upper Lower.
const Version = "15.0.0"
Version is the Unicode edition from which the tables are derived.
Variables ¶
var CaseRanges = []CaseRange{}/* 328 elements not displayed */
CaseRanges is the table describing case mappings for all letters with non-self mappings.
var Digit = &RangeTable{ R16: []Range16{ {0x0030, 0x0039, 1}, {0x0660, 0x0669, 1}, {0x06f0, 0x06f9, 1}, {0x07c0, 0x07c9, 1}, {0x0966, 0x096f, 1}, {0x09e6, 0x09ef, 1}, {0x0a66, 0x0a6f, 1}, {0x0ae6, 0x0aef, 1}, {0x0b66, 0x0b6f, 1}, {0x0be6, 0x0bef, 1}, {0x0c66, 0x0c6f, 1}, {0x0ce6, 0x0cef, 1}, {0x0d66, 0x0d6f, 1}, {0x0de6, 0x0def, 1}, {0x0e50, 0x0e59, 1}, {0x0ed0, 0x0ed9, 1}, {0x0f20, 0x0f29, 1}, {0x1040, 0x1049, 1}, {0x1090, 0x1099, 1}, {0x17e0, 0x17e9, 1}, {0x1810, 0x1819, 1}, {0x1946, 0x194f, 1}, {0x19d0, 0x19d9, 1}, {0x1a80, 0x1a89, 1}, {0x1a90, 0x1a99, 1}, {0x1b50, 0x1b59, 1}, {0x1bb0, 0x1bb9, 1}, {0x1c40, 0x1c49, 1}, {0x1c50, 0x1c59, 1}, {0xa620, 0xa629, 1}, {0xa8d0, 0xa8d9, 1}, {0xa900, 0xa909, 1}, {0xa9d0, 0xa9d9, 1}, {0xa9f0, 0xa9f9, 1}, {0xaa50, 0xaa59, 1}, {0xabf0, 0xabf9, 1}, {0xff10, 0xff19, 1}, }, R32: []Range32{ {0x104a0, 0x104a9, 1}, {0x10d30, 0x10d39, 1}, {0x11066, 0x1106f, 1}, {0x110f0, 0x110f9, 1}, {0x11136, 0x1113f, 1}, {0x111d0, 0x111d9, 1}, {0x112f0, 0x112f9, 1}, {0x11450, 0x11459, 1}, {0x114d0, 0x114d9, 1}, {0x11650, 0x11659, 1}, {0x116c0, 0x116c9, 1}, {0x11730, 0x11739, 1}, {0x118e0, 0x118e9, 1}, {0x11950, 0x11959, 1}, {0x11c50, 0x11c59, 1}, {0x11d50, 0x11d59, 1}, {0x11da0, 0x11da9, 1}, {0x11f50, 0x11f59, 1}, {0x16a60, 0x16a69, 1}, {0x16ac0, 0x16ac9, 1}, {0x16b50, 0x16b59, 1}, {0x1d7ce, 0x1d7ff, 1}, {0x1e140, 0x1e149, 1}, {0x1e2f0, 0x1e2f9, 1}, {0x1e4f0, 0x1e4f9, 1}, {0x1e950, 0x1e959, 1}, {0x1fbf0, 0x1fbf9, 1}, }, LatinOffset: 1, }
Digit is the set of Unicode characters in category Nd (Number, decimal digit).
var Latin = &RangeTable{ R16: []Range16{ {0x0041, 0x005a, 1}, {0x0061, 0x007a, 1}, {0x00aa, 0x00ba, 16}, {0x00c0, 0x00d6, 1}, {0x00d8, 0x00f6, 1}, {0x00f8, 0x02b8, 1}, {0x02e0, 0x02e4, 1}, {0x1d00, 0x1d25, 1}, {0x1d2c, 0x1d5c, 1}, {0x1d62, 0x1d65, 1}, {0x1d6b, 0x1d77, 1}, {0x1d79, 0x1dbe, 1}, {0x1e00, 0x1eff, 1}, {0x2071, 0x207f, 14}, {0x2090, 0x209c, 1}, {0x212a, 0x212b, 1}, {0x2132, 0x214e, 28}, {0x2160, 0x2188, 1}, {0x2c60, 0x2c7f, 1}, {0xa722, 0xa787, 1}, {0xa78b, 0xa7ca, 1}, {0xa7d0, 0xa7d1, 1}, {0xa7d3, 0xa7d5, 2}, {0xa7d6, 0xa7d9, 1}, {0xa7f2, 0xa7ff, 1}, {0xab30, 0xab5a, 1}, {0xab5c, 0xab64, 1}, {0xab66, 0xab69, 1}, {0xfb00, 0xfb06, 1}, {0xff21, 0xff3a, 1}, {0xff41, 0xff5a, 1}, }, R32: []Range32{ {0x10780, 0x10785, 1}, {0x10787, 0x107b0, 1}, {0x107b2, 0x107ba, 1}, {0x1df00, 0x1df1e, 1}, {0x1df25, 0x1df2a, 1}, }, LatinOffset: 5, }
Latin is the set of Unicode characters in script Latin.
var Letter = &RangeTable{ R16: []Range16{ {0x0041, 0x005a, 1}, {0x0061, 0x007a, 1}, {0x00aa, 0x00b5, 11}, {0x00ba, 0x00c0, 6}, {0x00c1, 0x00d6, 1}, {0x00d8, 0x00f6, 1}, {0x00f8, 0x02c1, 1}, {0x02c6, 0x02d1, 1}, {0x02e0, 0x02e4, 1}, {0x02ec, 0x02ee, 2}, {0x0370, 0x0374, 1}, {0x0376, 0x0377, 1}, {0x037a, 0x037d, 1}, {0x037f, 0x0386, 7}, {0x0388, 0x038a, 1}, {0x038c, 0x038e, 2}, {0x038f, 0x03a1, 1}, {0x03a3, 0x03f5, 1}, {0x03f7, 0x0481, 1}, {0x048a, 0x052f, 1}, {0x0531, 0x0556, 1}, {0x0559, 0x0560, 7}, {0x0561, 0x0588, 1}, {0x05d0, 0x05ea, 1}, {0x05ef, 0x05f2, 1}, {0x0620, 0x064a, 1}, {0x066e, 0x066f, 1}, {0x0671, 0x06d3, 1}, {0x06d5, 0x06e5, 16}, {0x06e6, 0x06ee, 8}, {0x06ef, 0x06fa, 11}, {0x06fb, 0x06fc, 1}, {0x06ff, 0x0710, 17}, {0x0712, 0x072f, 1}, {0x074d, 0x07a5, 1}, {0x07b1, 0x07ca, 25}, {0x07cb, 0x07ea, 1}, {0x07f4, 0x07f5, 1}, {0x07fa, 0x0800, 6}, {0x0801, 0x0815, 1}, {0x081a, 0x0824, 10}, {0x0828, 0x0840, 24}, {0x0841, 0x0858, 1}, {0x0860, 0x086a, 1}, {0x0870, 0x0887, 1}, {0x0889, 0x088e, 1}, {0x08a0, 0x08c9, 1}, {0x0904, 0x0939, 1}, {0x093d, 0x0950, 19}, {0x0958, 0x0961, 1}, {0x0971, 0x0980, 1}, {0x0985, 0x098c, 1}, {0x098f, 0x0990, 1}, {0x0993, 0x09a8, 1}, {0x09aa, 0x09b0, 1}, {0x09b2, 0x09b6, 4}, {0x09b7, 0x09b9, 1}, {0x09bd, 0x09ce, 17}, {0x09dc, 0x09dd, 1}, {0x09df, 0x09e1, 1}, {0x09f0, 0x09f1, 1}, {0x09fc, 0x0a05, 9}, {0x0a06, 0x0a0a, 1}, {0x0a0f, 0x0a10, 1}, {0x0a13, 0x0a28, 1}, {0x0a2a, 0x0a30, 1}, {0x0a32, 0x0a33, 1}, {0x0a35, 0x0a36, 1}, {0x0a38, 0x0a39, 1}, {0x0a59, 0x0a5c, 1}, {0x0a5e, 0x0a72, 20}, {0x0a73, 0x0a74, 1}, {0x0a85, 0x0a8d, 1}, {0x0a8f, 0x0a91, 1}, {0x0a93, 0x0aa8, 1}, {0x0aaa, 0x0ab0, 1}, {0x0ab2, 0x0ab3, 1}, {0x0ab5, 0x0ab9, 1}, {0x0abd, 0x0ad0, 19}, {0x0ae0, 0x0ae1, 1}, {0x0af9, 0x0b05, 12}, {0x0b06, 0x0b0c, 1}, {0x0b0f, 0x0b10, 1}, {0x0b13, 0x0b28, 1}, {0x0b2a, 0x0b30, 1}, {0x0b32, 0x0b33, 1}, {0x0b35, 0x0b39, 1}, {0x0b3d, 0x0b5c, 31}, {0x0b5d, 0x0b5f, 2}, {0x0b60, 0x0b61, 1}, {0x0b71, 0x0b83, 18}, {0x0b85, 0x0b8a, 1}, {0x0b8e, 0x0b90, 1}, {0x0b92, 0x0b95, 1}, {0x0b99, 0x0b9a, 1}, {0x0b9c, 0x0b9e, 2}, {0x0b9f, 0x0ba3, 4}, {0x0ba4, 0x0ba8, 4}, {0x0ba9, 0x0baa, 1}, {0x0bae, 0x0bb9, 1}, {0x0bd0, 0x0c05, 53}, {0x0c06, 0x0c0c, 1}, {0x0c0e, 0x0c10, 1}, {0x0c12, 0x0c28, 1}, {0x0c2a, 0x0c39, 1}, {0x0c3d, 0x0c58, 27}, {0x0c59, 0x0c5a, 1}, {0x0c5d, 0x0c60, 3}, {0x0c61, 0x0c80, 31}, {0x0c85, 0x0c8c, 1}, {0x0c8e, 0x0c90, 1}, {0x0c92, 0x0ca8, 1}, {0x0caa, 0x0cb3, 1}, {0x0cb5, 0x0cb9, 1}, {0x0cbd, 0x0cdd, 32}, {0x0cde, 0x0ce0, 2}, {0x0ce1, 0x0cf1, 16}, {0x0cf2, 0x0d04, 18}, {0x0d05, 0x0d0c, 1}, {0x0d0e, 0x0d10, 1}, {0x0d12, 0x0d3a, 1}, {0x0d3d, 0x0d4e, 17}, {0x0d54, 0x0d56, 1}, {0x0d5f, 0x0d61, 1}, {0x0d7a, 0x0d7f, 1}, {0x0d85, 0x0d96, 1}, {0x0d9a, 0x0db1, 1}, {0x0db3, 0x0dbb, 1}, {0x0dbd, 0x0dc0, 3}, {0x0dc1, 0x0dc6, 1}, {0x0e01, 0x0e30, 1}, {0x0e32, 0x0e33, 1}, {0x0e40, 0x0e46, 1}, {0x0e81, 0x0e82, 1}, {0x0e84, 0x0e86, 2}, {0x0e87, 0x0e8a, 1}, {0x0e8c, 0x0ea3, 1}, {0x0ea5, 0x0ea7, 2}, {0x0ea8, 0x0eb0, 1}, {0x0eb2, 0x0eb3, 1}, {0x0ebd, 0x0ec0, 3}, {0x0ec1, 0x0ec4, 1}, {0x0ec6, 0x0edc, 22}, {0x0edd, 0x0edf, 1}, {0x0f00, 0x0f40, 64}, {0x0f41, 0x0f47, 1}, {0x0f49, 0x0f6c, 1}, {0x0f88, 0x0f8c, 1}, {0x1000, 0x102a, 1}, {0x103f, 0x1050, 17}, {0x1051, 0x1055, 1}, {0x105a, 0x105d, 1}, {0x1061, 0x1065, 4}, {0x1066, 0x106e, 8}, {0x106f, 0x1070, 1}, {0x1075, 0x1081, 1}, {0x108e, 0x10a0, 18}, {0x10a1, 0x10c5, 1}, {0x10c7, 0x10cd, 6}, {0x10d0, 0x10fa, 1}, {0x10fc, 0x1248, 1}, {0x124a, 0x124d, 1}, {0x1250, 0x1256, 1}, {0x1258, 0x125a, 2}, {0x125b, 0x125d, 1}, {0x1260, 0x1288, 1}, {0x128a, 0x128d, 1}, {0x1290, 0x12b0, 1}, {0x12b2, 0x12b5, 1}, {0x12b8, 0x12be, 1}, {0x12c0, 0x12c2, 2}, {0x12c3, 0x12c5, 1}, {0x12c8, 0x12d6, 1}, {0x12d8, 0x1310, 1}, {0x1312, 0x1315, 1}, {0x1318, 0x135a, 1}, {0x1380, 0x138f, 1}, {0x13a0, 0x13f5, 1}, {0x13f8, 0x13fd, 1}, {0x1401, 0x166c, 1}, {0x166f, 0x167f, 1}, {0x1681, 0x169a, 1}, {0x16a0, 0x16ea, 1}, {0x16f1, 0x16f8, 1}, {0x1700, 0x1711, 1}, {0x171f, 0x1731, 1}, {0x1740, 0x1751, 1}, {0x1760, 0x176c, 1}, {0x176e, 0x1770, 1}, {0x1780, 0x17b3, 1}, {0x17d7, 0x17dc, 5}, {0x1820, 0x1878, 1}, {0x1880, 0x1884, 1}, {0x1887, 0x18a8, 1}, {0x18aa, 0x18b0, 6}, {0x18b1, 0x18f5, 1}, {0x1900, 0x191e, 1}, {0x1950, 0x196d, 1}, {0x1970, 0x1974, 1}, {0x1980, 0x19ab, 1}, {0x19b0, 0x19c9, 1}, {0x1a00, 0x1a16, 1}, {0x1a20, 0x1a54, 1}, {0x1aa7, 0x1b05, 94}, {0x1b06, 0x1b33, 1}, {0x1b45, 0x1b4c, 1}, {0x1b83, 0x1ba0, 1}, {0x1bae, 0x1baf, 1}, {0x1bba, 0x1be5, 1}, {0x1c00, 0x1c23, 1}, {0x1c4d, 0x1c4f, 1}, {0x1c5a, 0x1c7d, 1}, {0x1c80, 0x1c88, 1}, {0x1c90, 0x1cba, 1}, {0x1cbd, 0x1cbf, 1}, {0x1ce9, 0x1cec, 1}, {0x1cee, 0x1cf3, 1}, {0x1cf5, 0x1cf6, 1}, {0x1cfa, 0x1d00, 6}, {0x1d01, 0x1dbf, 1}, {0x1e00, 0x1f15, 1}, {0x1f18, 0x1f1d, 1}, {0x1f20, 0x1f45, 1}, {0x1f48, 0x1f4d, 1}, {0x1f50, 0x1f57, 1}, {0x1f59, 0x1f5f, 2}, {0x1f60, 0x1f7d, 1}, {0x1f80, 0x1fb4, 1}, {0x1fb6, 0x1fbc, 1}, {0x1fbe, 0x1fc2, 4}, {0x1fc3, 0x1fc4, 1}, {0x1fc6, 0x1fcc, 1}, {0x1fd0, 0x1fd3, 1}, {0x1fd6, 0x1fdb, 1}, {0x1fe0, 0x1fec, 1}, {0x1ff2, 0x1ff4, 1}, {0x1ff6, 0x1ffc, 1}, {0x2071, 0x207f, 14}, {0x2090, 0x209c, 1}, {0x2102, 0x2107, 5}, {0x210a, 0x2113, 1}, {0x2115, 0x2119, 4}, {0x211a, 0x211d, 1}, {0x2124, 0x212a, 2}, {0x212b, 0x212d, 1}, {0x212f, 0x2139, 1}, {0x213c, 0x213f, 1}, {0x2145, 0x2149, 1}, {0x214e, 0x2183, 53}, {0x2184, 0x2c00, 2684}, {0x2c01, 0x2ce4, 1}, {0x2ceb, 0x2cee, 1}, {0x2cf2, 0x2cf3, 1}, {0x2d00, 0x2d25, 1}, {0x2d27, 0x2d2d, 6}, {0x2d30, 0x2d67, 1}, {0x2d6f, 0x2d80, 17}, {0x2d81, 0x2d96, 1}, {0x2da0, 0x2da6, 1}, {0x2da8, 0x2dae, 1}, {0x2db0, 0x2db6, 1}, {0x2db8, 0x2dbe, 1}, {0x2dc0, 0x2dc6, 1}, {0x2dc8, 0x2dce, 1}, {0x2dd0, 0x2dd6, 1}, {0x2dd8, 0x2dde, 1}, {0x2e2f, 0x3005, 470}, {0x3006, 0x3031, 43}, {0x3032, 0x3035, 1}, {0x303b, 0x303c, 1}, {0x3041, 0x3096, 1}, {0x309d, 0x309f, 1}, {0x30a1, 0x30fa, 1}, {0x30fc, 0x30ff, 1}, {0x3105, 0x312f, 1}, {0x3131, 0x318e, 1}, {0x31a0, 0x31bf, 1}, {0x31f0, 0x31ff, 1}, {0x3400, 0x4dbf, 1}, {0x4e00, 0xa48c, 1}, {0xa4d0, 0xa4fd, 1}, {0xa500, 0xa60c, 1}, {0xa610, 0xa61f, 1}, {0xa62a, 0xa62b, 1}, {0xa640, 0xa66e, 1}, {0xa67f, 0xa69d, 1}, {0xa6a0, 0xa6e5, 1}, {0xa717, 0xa71f, 1}, {0xa722, 0xa788, 1}, {0xa78b, 0xa7ca, 1}, {0xa7d0, 0xa7d1, 1}, {0xa7d3, 0xa7d5, 2}, {0xa7d6, 0xa7d9, 1}, {0xa7f2, 0xa801, 1}, {0xa803, 0xa805, 1}, {0xa807, 0xa80a, 1}, {0xa80c, 0xa822, 1}, {0xa840, 0xa873, 1}, {0xa882, 0xa8b3, 1}, {0xa8f2, 0xa8f7, 1}, {0xa8fb, 0xa8fd, 2}, {0xa8fe, 0xa90a, 12}, {0xa90b, 0xa925, 1}, {0xa930, 0xa946, 1}, {0xa960, 0xa97c, 1}, {0xa984, 0xa9b2, 1}, {0xa9cf, 0xa9e0, 17}, {0xa9e1, 0xa9e4, 1}, {0xa9e6, 0xa9ef, 1}, {0xa9fa, 0xa9fe, 1}, {0xaa00, 0xaa28, 1}, {0xaa40, 0xaa42, 1}, {0xaa44, 0xaa4b, 1}, {0xaa60, 0xaa76, 1}, {0xaa7a, 0xaa7e, 4}, {0xaa7f, 0xaaaf, 1}, {0xaab1, 0xaab5, 4}, {0xaab6, 0xaab9, 3}, {0xaaba, 0xaabd, 1}, {0xaac0, 0xaac2, 2}, {0xaadb, 0xaadd, 1}, {0xaae0, 0xaaea, 1}, {0xaaf2, 0xaaf4, 1}, {0xab01, 0xab06, 1}, {0xab09, 0xab0e, 1}, {0xab11, 0xab16, 1}, {0xab20, 0xab26, 1}, {0xab28, 0xab2e, 1}, {0xab30, 0xab5a, 1}, {0xab5c, 0xab69, 1}, {0xab70, 0xabe2, 1}, {0xac00, 0xd7a3, 1}, {0xd7b0, 0xd7c6, 1}, {0xd7cb, 0xd7fb, 1}, {0xf900, 0xfa6d, 1}, {0xfa70, 0xfad9, 1}, {0xfb00, 0xfb06, 1}, {0xfb13, 0xfb17, 1}, {0xfb1d, 0xfb1f, 2}, {0xfb20, 0xfb28, 1}, {0xfb2a, 0xfb36, 1}, {0xfb38, 0xfb3c, 1}, {0xfb3e, 0xfb40, 2}, {0xfb41, 0xfb43, 2}, {0xfb44, 0xfb46, 2}, {0xfb47, 0xfbb1, 1}, {0xfbd3, 0xfd3d, 1}, {0xfd50, 0xfd8f, 1}, {0xfd92, 0xfdc7, 1}, {0xfdf0, 0xfdfb, 1}, {0xfe70, 0xfe74, 1}, {0xfe76, 0xfefc, 1}, {0xff21, 0xff3a, 1}, {0xff41, 0xff5a, 1}, {0xff66, 0xffbe, 1}, {0xffc2, 0xffc7, 1}, {0xffca, 0xffcf, 1}, {0xffd2, 0xffd7, 1}, {0xffda, 0xffdc, 1}, }, R32: []Range32{ {0x10000, 0x1000b, 1}, {0x1000d, 0x10026, 1}, {0x10028, 0x1003a, 1}, {0x1003c, 0x1003d, 1}, {0x1003f, 0x1004d, 1}, {0x10050, 0x1005d, 1}, {0x10080, 0x100fa, 1}, {0x10280, 0x1029c, 1}, {0x102a0, 0x102d0, 1}, {0x10300, 0x1031f, 1}, {0x1032d, 0x10340, 1}, {0x10342, 0x10349, 1}, {0x10350, 0x10375, 1}, {0x10380, 0x1039d, 1}, {0x103a0, 0x103c3, 1}, {0x103c8, 0x103cf, 1}, {0x10400, 0x1049d, 1}, {0x104b0, 0x104d3, 1}, {0x104d8, 0x104fb, 1}, {0x10500, 0x10527, 1}, {0x10530, 0x10563, 1}, {0x10570, 0x1057a, 1}, {0x1057c, 0x1058a, 1}, {0x1058c, 0x10592, 1}, {0x10594, 0x10595, 1}, {0x10597, 0x105a1, 1}, {0x105a3, 0x105b1, 1}, {0x105b3, 0x105b9, 1}, {0x105bb, 0x105bc, 1}, {0x10600, 0x10736, 1}, {0x10740, 0x10755, 1}, {0x10760, 0x10767, 1}, {0x10780, 0x10785, 1}, {0x10787, 0x107b0, 1}, {0x107b2, 0x107ba, 1}, {0x10800, 0x10805, 1}, {0x10808, 0x1080a, 2}, {0x1080b, 0x10835, 1}, {0x10837, 0x10838, 1}, {0x1083c, 0x1083f, 3}, {0x10840, 0x10855, 1}, {0x10860, 0x10876, 1}, {0x10880, 0x1089e, 1}, {0x108e0, 0x108f2, 1}, {0x108f4, 0x108f5, 1}, {0x10900, 0x10915, 1}, {0x10920, 0x10939, 1}, {0x10980, 0x109b7, 1}, {0x109be, 0x109bf, 1}, {0x10a00, 0x10a10, 16}, {0x10a11, 0x10a13, 1}, {0x10a15, 0x10a17, 1}, {0x10a19, 0x10a35, 1}, {0x10a60, 0x10a7c, 1}, {0x10a80, 0x10a9c, 1}, {0x10ac0, 0x10ac7, 1}, {0x10ac9, 0x10ae4, 1}, {0x10b00, 0x10b35, 1}, {0x10b40, 0x10b55, 1}, {0x10b60, 0x10b72, 1}, {0x10b80, 0x10b91, 1}, {0x10c00, 0x10c48, 1}, {0x10c80, 0x10cb2, 1}, {0x10cc0, 0x10cf2, 1}, {0x10d00, 0x10d23, 1}, {0x10e80, 0x10ea9, 1}, {0x10eb0, 0x10eb1, 1}, {0x10f00, 0x10f1c, 1}, {0x10f27, 0x10f30, 9}, {0x10f31, 0x10f45, 1}, {0x10f70, 0x10f81, 1}, {0x10fb0, 0x10fc4, 1}, {0x10fe0, 0x10ff6, 1}, {0x11003, 0x11037, 1}, {0x11071, 0x11072, 1}, {0x11075, 0x11083, 14}, {0x11084, 0x110af, 1}, {0x110d0, 0x110e8, 1}, {0x11103, 0x11126, 1}, {0x11144, 0x11147, 3}, {0x11150, 0x11172, 1}, {0x11176, 0x11183, 13}, {0x11184, 0x111b2, 1}, {0x111c1, 0x111c4, 1}, {0x111da, 0x111dc, 2}, {0x11200, 0x11211, 1}, {0x11213, 0x1122b, 1}, {0x1123f, 0x11240, 1}, {0x11280, 0x11286, 1}, {0x11288, 0x1128a, 2}, {0x1128b, 0x1128d, 1}, {0x1128f, 0x1129d, 1}, {0x1129f, 0x112a8, 1}, {0x112b0, 0x112de, 1}, {0x11305, 0x1130c, 1}, {0x1130f, 0x11310, 1}, {0x11313, 0x11328, 1}, {0x1132a, 0x11330, 1}, {0x11332, 0x11333, 1}, {0x11335, 0x11339, 1}, {0x1133d, 0x11350, 19}, {0x1135d, 0x11361, 1}, {0x11400, 0x11434, 1}, {0x11447, 0x1144a, 1}, {0x1145f, 0x11461, 1}, {0x11480, 0x114af, 1}, {0x114c4, 0x114c5, 1}, {0x114c7, 0x11580, 185}, {0x11581, 0x115ae, 1}, {0x115d8, 0x115db, 1}, {0x11600, 0x1162f, 1}, {0x11644, 0x11680, 60}, {0x11681, 0x116aa, 1}, {0x116b8, 0x11700, 72}, {0x11701, 0x1171a, 1}, {0x11740, 0x11746, 1}, {0x11800, 0x1182b, 1}, {0x118a0, 0x118df, 1}, {0x118ff, 0x11906, 1}, {0x11909, 0x1190c, 3}, {0x1190d, 0x11913, 1}, {0x11915, 0x11916, 1}, {0x11918, 0x1192f, 1}, {0x1193f, 0x11941, 2}, {0x119a0, 0x119a7, 1}, {0x119aa, 0x119d0, 1}, {0x119e1, 0x119e3, 2}, {0x11a00, 0x11a0b, 11}, {0x11a0c, 0x11a32, 1}, {0x11a3a, 0x11a50, 22}, {0x11a5c, 0x11a89, 1}, {0x11a9d, 0x11ab0, 19}, {0x11ab1, 0x11af8, 1}, {0x11c00, 0x11c08, 1}, {0x11c0a, 0x11c2e, 1}, {0x11c40, 0x11c72, 50}, {0x11c73, 0x11c8f, 1}, {0x11d00, 0x11d06, 1}, {0x11d08, 0x11d09, 1}, {0x11d0b, 0x11d30, 1}, {0x11d46, 0x11d60, 26}, {0x11d61, 0x11d65, 1}, {0x11d67, 0x11d68, 1}, {0x11d6a, 0x11d89, 1}, {0x11d98, 0x11ee0, 328}, {0x11ee1, 0x11ef2, 1}, {0x11f02, 0x11f04, 2}, {0x11f05, 0x11f10, 1}, {0x11f12, 0x11f33, 1}, {0x11fb0, 0x12000, 80}, {0x12001, 0x12399, 1}, {0x12480, 0x12543, 1}, {0x12f90, 0x12ff0, 1}, {0x13000, 0x1342f, 1}, {0x13441, 0x13446, 1}, {0x14400, 0x14646, 1}, {0x16800, 0x16a38, 1}, {0x16a40, 0x16a5e, 1}, {0x16a70, 0x16abe, 1}, {0x16ad0, 0x16aed, 1}, {0x16b00, 0x16b2f, 1}, {0x16b40, 0x16b43, 1}, {0x16b63, 0x16b77, 1}, {0x16b7d, 0x16b8f, 1}, {0x16e40, 0x16e7f, 1}, {0x16f00, 0x16f4a, 1}, {0x16f50, 0x16f93, 67}, {0x16f94, 0x16f9f, 1}, {0x16fe0, 0x16fe1, 1}, {0x16fe3, 0x17000, 29}, {0x17001, 0x187f7, 1}, {0x18800, 0x18cd5, 1}, {0x18d00, 0x18d08, 1}, {0x1aff0, 0x1aff3, 1}, {0x1aff5, 0x1affb, 1}, {0x1affd, 0x1affe, 1}, {0x1b000, 0x1b122, 1}, {0x1b132, 0x1b150, 30}, {0x1b151, 0x1b152, 1}, {0x1b155, 0x1b164, 15}, {0x1b165, 0x1b167, 1}, {0x1b170, 0x1b2fb, 1}, {0x1bc00, 0x1bc6a, 1}, {0x1bc70, 0x1bc7c, 1}, {0x1bc80, 0x1bc88, 1}, {0x1bc90, 0x1bc99, 1}, {0x1d400, 0x1d454, 1}, {0x1d456, 0x1d49c, 1}, {0x1d49e, 0x1d49f, 1}, {0x1d4a2, 0x1d4a5, 3}, {0x1d4a6, 0x1d4a9, 3}, {0x1d4aa, 0x1d4ac, 1}, {0x1d4ae, 0x1d4b9, 1}, {0x1d4bb, 0x1d4bd, 2}, {0x1d4be, 0x1d4c3, 1}, {0x1d4c5, 0x1d505, 1}, {0x1d507, 0x1d50a, 1}, {0x1d50d, 0x1d514, 1}, {0x1d516, 0x1d51c, 1}, {0x1d51e, 0x1d539, 1}, {0x1d53b, 0x1d53e, 1}, {0x1d540, 0x1d544, 1}, {0x1d546, 0x1d54a, 4}, {0x1d54b, 0x1d550, 1}, {0x1d552, 0x1d6a5, 1}, {0x1d6a8, 0x1d6c0, 1}, {0x1d6c2, 0x1d6da, 1}, {0x1d6dc, 0x1d6fa, 1}, {0x1d6fc, 0x1d714, 1}, {0x1d716, 0x1d734, 1}, {0x1d736, 0x1d74e, 1}, {0x1d750, 0x1d76e, 1}, {0x1d770, 0x1d788, 1}, {0x1d78a, 0x1d7a8, 1}, {0x1d7aa, 0x1d7c2, 1}, {0x1d7c4, 0x1d7cb, 1}, {0x1df00, 0x1df1e, 1}, {0x1df25, 0x1df2a, 1}, {0x1e030, 0x1e06d, 1}, {0x1e100, 0x1e12c, 1}, {0x1e137, 0x1e13d, 1}, {0x1e14e, 0x1e290, 322}, {0x1e291, 0x1e2ad, 1}, {0x1e2c0, 0x1e2eb, 1}, {0x1e4d0, 0x1e4eb, 1}, {0x1e7e0, 0x1e7e6, 1}, {0x1e7e8, 0x1e7eb, 1}, {0x1e7ed, 0x1e7ee, 1}, {0x1e7f0, 0x1e7fe, 1}, {0x1e800, 0x1e8c4, 1}, {0x1e900, 0x1e943, 1}, {0x1e94b, 0x1ee00, 1205}, {0x1ee01, 0x1ee03, 1}, {0x1ee05, 0x1ee1f, 1}, {0x1ee21, 0x1ee22, 1}, {0x1ee24, 0x1ee27, 3}, {0x1ee29, 0x1ee32, 1}, {0x1ee34, 0x1ee37, 1}, {0x1ee39, 0x1ee3b, 2}, {0x1ee42, 0x1ee47, 5}, {0x1ee49, 0x1ee4d, 2}, {0x1ee4e, 0x1ee4f, 1}, {0x1ee51, 0x1ee52, 1}, {0x1ee54, 0x1ee57, 3}, {0x1ee59, 0x1ee61, 2}, {0x1ee62, 0x1ee64, 2}, {0x1ee67, 0x1ee6a, 1}, {0x1ee6c, 0x1ee72, 1}, {0x1ee74, 0x1ee77, 1}, {0x1ee79, 0x1ee7c, 1}, {0x1ee7e, 0x1ee80, 2}, {0x1ee81, 0x1ee89, 1}, {0x1ee8b, 0x1ee9b, 1}, {0x1eea1, 0x1eea3, 1}, {0x1eea5, 0x1eea9, 1}, {0x1eeab, 0x1eebb, 1}, {0x20000, 0x2a6df, 1}, {0x2a700, 0x2b739, 1}, {0x2b740, 0x2b81d, 1}, {0x2b820, 0x2cea1, 1}, {0x2ceb0, 0x2ebe0, 1}, {0x2f800, 0x2fa1d, 1}, {0x30000, 0x3134a, 1}, {0x31350, 0x323af, 1}, }, LatinOffset: 6, }
Letter is the set of Unicode letters, category L (Letter).
var Lower = &RangeTable{ R16: []Range16{ {0x0061, 0x007a, 1}, {0x00b5, 0x00df, 42}, {0x00e0, 0x00f6, 1}, {0x00f8, 0x00ff, 1}, {0x0101, 0x0137, 2}, {0x0138, 0x0148, 2}, {0x0149, 0x0177, 2}, {0x017a, 0x017e, 2}, {0x017f, 0x0180, 1}, {0x0183, 0x0185, 2}, {0x0188, 0x018c, 4}, {0x018d, 0x0192, 5}, {0x0195, 0x0199, 4}, {0x019a, 0x019b, 1}, {0x019e, 0x01a1, 3}, {0x01a3, 0x01a5, 2}, {0x01a8, 0x01aa, 2}, {0x01ab, 0x01ad, 2}, {0x01b0, 0x01b4, 4}, {0x01b6, 0x01b9, 3}, {0x01ba, 0x01bd, 3}, {0x01be, 0x01bf, 1}, {0x01c6, 0x01cc, 3}, {0x01ce, 0x01dc, 2}, {0x01dd, 0x01ef, 2}, {0x01f0, 0x01f3, 3}, {0x01f5, 0x01f9, 4}, {0x01fb, 0x0233, 2}, {0x0234, 0x0239, 1}, {0x023c, 0x023f, 3}, {0x0240, 0x0242, 2}, {0x0247, 0x024f, 2}, {0x0250, 0x0293, 1}, {0x0295, 0x02af, 1}, {0x0371, 0x0373, 2}, {0x0377, 0x037b, 4}, {0x037c, 0x037d, 1}, {0x0390, 0x03ac, 28}, {0x03ad, 0x03ce, 1}, {0x03d0, 0x03d1, 1}, {0x03d5, 0x03d7, 1}, {0x03d9, 0x03ef, 2}, {0x03f0, 0x03f3, 1}, {0x03f5, 0x03fb, 3}, {0x03fc, 0x0430, 52}, {0x0431, 0x045f, 1}, {0x0461, 0x0481, 2}, {0x048b, 0x04bf, 2}, {0x04c2, 0x04ce, 2}, {0x04cf, 0x052f, 2}, {0x0560, 0x0588, 1}, {0x10d0, 0x10fa, 1}, {0x10fd, 0x10ff, 1}, {0x13f8, 0x13fd, 1}, {0x1c80, 0x1c88, 1}, {0x1d00, 0x1d2b, 1}, {0x1d6b, 0x1d77, 1}, {0x1d79, 0x1d9a, 1}, {0x1e01, 0x1e95, 2}, {0x1e96, 0x1e9d, 1}, {0x1e9f, 0x1eff, 2}, {0x1f00, 0x1f07, 1}, {0x1f10, 0x1f15, 1}, {0x1f20, 0x1f27, 1}, {0x1f30, 0x1f37, 1}, {0x1f40, 0x1f45, 1}, {0x1f50, 0x1f57, 1}, {0x1f60, 0x1f67, 1}, {0x1f70, 0x1f7d, 1}, {0x1f80, 0x1f87, 1}, {0x1f90, 0x1f97, 1}, {0x1fa0, 0x1fa7, 1}, {0x1fb0, 0x1fb4, 1}, {0x1fb6, 0x1fb7, 1}, {0x1fbe, 0x1fc2, 4}, {0x1fc3, 0x1fc4, 1}, {0x1fc6, 0x1fc7, 1}, {0x1fd0, 0x1fd3, 1}, {0x1fd6, 0x1fd7, 1}, {0x1fe0, 0x1fe7, 1}, {0x1ff2, 0x1ff4, 1}, {0x1ff6, 0x1ff7, 1}, {0x210a, 0x210e, 4}, {0x210f, 0x2113, 4}, {0x212f, 0x2139, 5}, {0x213c, 0x213d, 1}, {0x2146, 0x2149, 1}, {0x214e, 0x2184, 54}, {0x2c30, 0x2c5f, 1}, {0x2c61, 0x2c65, 4}, {0x2c66, 0x2c6c, 2}, {0x2c71, 0x2c73, 2}, {0x2c74, 0x2c76, 2}, {0x2c77, 0x2c7b, 1}, {0x2c81, 0x2ce3, 2}, {0x2ce4, 0x2cec, 8}, {0x2cee, 0x2cf3, 5}, {0x2d00, 0x2d25, 1}, {0x2d27, 0x2d2d, 6}, {0xa641, 0xa66d, 2}, {0xa681, 0xa69b, 2}, {0xa723, 0xa72f, 2}, {0xa730, 0xa731, 1}, {0xa733, 0xa771, 2}, {0xa772, 0xa778, 1}, {0xa77a, 0xa77c, 2}, {0xa77f, 0xa787, 2}, {0xa78c, 0xa78e, 2}, {0xa791, 0xa793, 2}, {0xa794, 0xa795, 1}, {0xa797, 0xa7a9, 2}, {0xa7af, 0xa7b5, 6}, {0xa7b7, 0xa7c3, 2}, {0xa7c8, 0xa7ca, 2}, {0xa7d1, 0xa7d9, 2}, {0xa7f6, 0xa7fa, 4}, {0xab30, 0xab5a, 1}, {0xab60, 0xab68, 1}, {0xab70, 0xabbf, 1}, {0xfb00, 0xfb06, 1}, {0xfb13, 0xfb17, 1}, {0xff41, 0xff5a, 1}, }, R32: []Range32{ {0x10428, 0x1044f, 1}, {0x104d8, 0x104fb, 1}, {0x10597, 0x105a1, 1}, {0x105a3, 0x105b1, 1}, {0x105b3, 0x105b9, 1}, {0x105bb, 0x105bc, 1}, {0x10cc0, 0x10cf2, 1}, {0x118c0, 0x118df, 1}, {0x16e60, 0x16e7f, 1}, {0x1d41a, 0x1d433, 1}, {0x1d44e, 0x1d454, 1}, {0x1d456, 0x1d467, 1}, {0x1d482, 0x1d49b, 1}, {0x1d4b6, 0x1d4b9, 1}, {0x1d4bb, 0x1d4bd, 2}, {0x1d4be, 0x1d4c3, 1}, {0x1d4c5, 0x1d4cf, 1}, {0x1d4ea, 0x1d503, 1}, {0x1d51e, 0x1d537, 1}, {0x1d552, 0x1d56b, 1}, {0x1d586, 0x1d59f, 1}, {0x1d5ba, 0x1d5d3, 1}, {0x1d5ee, 0x1d607, 1}, {0x1d622, 0x1d63b, 1}, {0x1d656, 0x1d66f, 1}, {0x1d68a, 0x1d6a5, 1}, {0x1d6c2, 0x1d6da, 1}, {0x1d6dc, 0x1d6e1, 1}, {0x1d6fc, 0x1d714, 1}, {0x1d716, 0x1d71b, 1}, {0x1d736, 0x1d74e, 1}, {0x1d750, 0x1d755, 1}, {0x1d770, 0x1d788, 1}, {0x1d78a, 0x1d78f, 1}, {0x1d7aa, 0x1d7c2, 1}, {0x1d7c4, 0x1d7c9, 1}, {0x1d7cb, 0x1df00, 1845}, {0x1df01, 0x1df09, 1}, {0x1df0b, 0x1df1e, 1}, {0x1df25, 0x1df2a, 1}, {0x1e922, 0x1e943, 1}, }, LatinOffset: 4, }
Lower is the set of Unicode characters in category Ll (Letter, lowercase).
var Title = &RangeTable{ R16: []Range16{ {0x01c5, 0x01cb, 3}, {0x01f2, 0x1f88, 7574}, {0x1f89, 0x1f8f, 1}, {0x1f98, 0x1f9f, 1}, {0x1fa8, 0x1faf, 1}, {0x1fbc, 0x1fcc, 16}, {0x1ffc, 0x1ffc, 1}, }, }
Title is the set of Unicode characters in category Lt (Letter, titlecase).
var Upper = &RangeTable{ R16: []Range16{ {0x0041, 0x005a, 1}, {0x00c0, 0x00d6, 1}, {0x00d8, 0x00de, 1}, {0x0100, 0x0136, 2}, {0x0139, 0x0147, 2}, {0x014a, 0x0178, 2}, {0x0179, 0x017d, 2}, {0x0181, 0x0182, 1}, {0x0184, 0x0186, 2}, {0x0187, 0x0189, 2}, {0x018a, 0x018b, 1}, {0x018e, 0x0191, 1}, {0x0193, 0x0194, 1}, {0x0196, 0x0198, 1}, {0x019c, 0x019d, 1}, {0x019f, 0x01a0, 1}, {0x01a2, 0x01a6, 2}, {0x01a7, 0x01a9, 2}, {0x01ac, 0x01ae, 2}, {0x01af, 0x01b1, 2}, {0x01b2, 0x01b3, 1}, {0x01b5, 0x01b7, 2}, {0x01b8, 0x01bc, 4}, {0x01c4, 0x01cd, 3}, {0x01cf, 0x01db, 2}, {0x01de, 0x01ee, 2}, {0x01f1, 0x01f4, 3}, {0x01f6, 0x01f8, 1}, {0x01fa, 0x0232, 2}, {0x023a, 0x023b, 1}, {0x023d, 0x023e, 1}, {0x0241, 0x0243, 2}, {0x0244, 0x0246, 1}, {0x0248, 0x024e, 2}, {0x0370, 0x0372, 2}, {0x0376, 0x037f, 9}, {0x0386, 0x0388, 2}, {0x0389, 0x038a, 1}, {0x038c, 0x038e, 2}, {0x038f, 0x0391, 2}, {0x0392, 0x03a1, 1}, {0x03a3, 0x03ab, 1}, {0x03cf, 0x03d2, 3}, {0x03d3, 0x03d4, 1}, {0x03d8, 0x03ee, 2}, {0x03f4, 0x03f7, 3}, {0x03f9, 0x03fa, 1}, {0x03fd, 0x042f, 1}, {0x0460, 0x0480, 2}, {0x048a, 0x04c0, 2}, {0x04c1, 0x04cd, 2}, {0x04d0, 0x052e, 2}, {0x0531, 0x0556, 1}, {0x10a0, 0x10c5, 1}, {0x10c7, 0x10cd, 6}, {0x13a0, 0x13f5, 1}, {0x1c90, 0x1cba, 1}, {0x1cbd, 0x1cbf, 1}, {0x1e00, 0x1e94, 2}, {0x1e9e, 0x1efe, 2}, {0x1f08, 0x1f0f, 1}, {0x1f18, 0x1f1d, 1}, {0x1f28, 0x1f2f, 1}, {0x1f38, 0x1f3f, 1}, {0x1f48, 0x1f4d, 1}, {0x1f59, 0x1f5f, 2}, {0x1f68, 0x1f6f, 1}, {0x1fb8, 0x1fbb, 1}, {0x1fc8, 0x1fcb, 1}, {0x1fd8, 0x1fdb, 1}, {0x1fe8, 0x1fec, 1}, {0x1ff8, 0x1ffb, 1}, {0x2102, 0x2107, 5}, {0x210b, 0x210d, 1}, {0x2110, 0x2112, 1}, {0x2115, 0x2119, 4}, {0x211a, 0x211d, 1}, {0x2124, 0x212a, 2}, {0x212b, 0x212d, 1}, {0x2130, 0x2133, 1}, {0x213e, 0x213f, 1}, {0x2145, 0x2183, 62}, {0x2c00, 0x2c2f, 1}, {0x2c60, 0x2c62, 2}, {0x2c63, 0x2c64, 1}, {0x2c67, 0x2c6d, 2}, {0x2c6e, 0x2c70, 1}, {0x2c72, 0x2c75, 3}, {0x2c7e, 0x2c80, 1}, {0x2c82, 0x2ce2, 2}, {0x2ceb, 0x2ced, 2}, {0x2cf2, 0xa640, 31054}, {0xa642, 0xa66c, 2}, {0xa680, 0xa69a, 2}, {0xa722, 0xa72e, 2}, {0xa732, 0xa76e, 2}, {0xa779, 0xa77d, 2}, {0xa77e, 0xa786, 2}, {0xa78b, 0xa78d, 2}, {0xa790, 0xa792, 2}, {0xa796, 0xa7aa, 2}, {0xa7ab, 0xa7ae, 1}, {0xa7b0, 0xa7b4, 1}, {0xa7b6, 0xa7c4, 2}, {0xa7c5, 0xa7c7, 1}, {0xa7c9, 0xa7d0, 7}, {0xa7d6, 0xa7d8, 2}, {0xa7f5, 0xff21, 22316}, {0xff22, 0xff3a, 1}, }, R32: []Range32{ {0x10400, 0x10427, 1}, {0x104b0, 0x104d3, 1}, {0x10570, 0x1057a, 1}, {0x1057c, 0x1058a, 1}, {0x1058c, 0x10592, 1}, {0x10594, 0x10595, 1}, {0x10c80, 0x10cb2, 1}, {0x118a0, 0x118bf, 1}, {0x16e40, 0x16e5f, 1}, {0x1d400, 0x1d419, 1}, {0x1d434, 0x1d44d, 1}, {0x1d468, 0x1d481, 1}, {0x1d49c, 0x1d49e, 2}, {0x1d49f, 0x1d4a5, 3}, {0x1d4a6, 0x1d4a9, 3}, {0x1d4aa, 0x1d4ac, 1}, {0x1d4ae, 0x1d4b5, 1}, {0x1d4d0, 0x1d4e9, 1}, {0x1d504, 0x1d505, 1}, {0x1d507, 0x1d50a, 1}, {0x1d50d, 0x1d514, 1}, {0x1d516, 0x1d51c, 1}, {0x1d538, 0x1d539, 1}, {0x1d53b, 0x1d53e, 1}, {0x1d540, 0x1d544, 1}, {0x1d546, 0x1d54a, 4}, {0x1d54b, 0x1d550, 1}, {0x1d56c, 0x1d585, 1}, {0x1d5a0, 0x1d5b9, 1}, {0x1d5d4, 0x1d5ed, 1}, {0x1d608, 0x1d621, 1}, {0x1d63c, 0x1d655, 1}, {0x1d670, 0x1d689, 1}, {0x1d6a8, 0x1d6c0, 1}, {0x1d6e2, 0x1d6fa, 1}, {0x1d71c, 0x1d734, 1}, {0x1d756, 0x1d76e, 1}, {0x1d790, 0x1d7a8, 1}, {0x1d7ca, 0x1e900, 4406}, {0x1e901, 0x1e921, 1}, }, LatinOffset: 3, }
Upper is the set of Unicode characters in category Lu (Letter, uppercase).
var White_Space = &RangeTable{ R16: []Range16{ {0x0009, 0x000d, 1}, {0x0020, 0x0085, 101}, {0x00a0, 0x1680, 5600}, {0x2000, 0x200a, 1}, {0x2028, 0x2029, 1}, {0x202f, 0x205f, 48}, {0x3000, 0x3000, 1}, }, LatinOffset: 2, }
White_Space is the set of Unicode characters with property White_Space.
Functions ¶
func In ¶
func In(r rune, ranges ...*RangeTable) bool
In reports whether the rune is a member of one of the ranges.
func Is ¶
func Is(rangeTab *RangeTable, r rune) bool
Is reports whether the rune is in the specified table of ranges.
func IsDigit ¶
IsDigit reports whether the rune is a decimal digit.
Example ¶
package main
import (
"solod.dev/so/fmt"
"solod.dev/so/unicode"
)
func main() {
fmt.Printf("%t\n", unicode.IsDigit('৩'))
fmt.Printf("%t\n", unicode.IsDigit('A'))
}
Output: true false
func IsLetter ¶
IsLetter reports whether the rune is a letter (category [L]).
Example ¶
package main
import (
"solod.dev/so/fmt"
"solod.dev/so/unicode"
)
func main() {
fmt.Printf("%t\n", unicode.IsLetter('A'))
fmt.Printf("%t\n", unicode.IsLetter('7'))
}
Output: true false
func IsLower ¶
IsLower reports whether the rune is a lower case letter.
Example ¶
package main
import (
"solod.dev/so/fmt"
"solod.dev/so/unicode"
)
func main() {
fmt.Printf("%t\n", unicode.IsLower('a'))
fmt.Printf("%t\n", unicode.IsLower('A'))
}
Output: true false
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 spacing characters are defined by White_Space.
Example ¶
package main
import (
"solod.dev/so/fmt"
"solod.dev/so/unicode"
)
func main() {
fmt.Printf("%t\n", unicode.IsSpace(' '))
fmt.Printf("%t\n", unicode.IsSpace('\n'))
fmt.Printf("%t\n", unicode.IsSpace('\t'))
fmt.Printf("%t\n", unicode.IsSpace('a'))
}
Output: true true true false
func IsTitle ¶
IsTitle reports whether the rune is a title case letter.
Example ¶
package main
import (
"solod.dev/so/fmt"
"solod.dev/so/unicode"
)
func main() {
fmt.Printf("%t\n", unicode.IsTitle('Dž'))
fmt.Printf("%t\n", unicode.IsTitle('a'))
}
Output: true false
func IsUpper ¶
IsUpper reports whether the rune is an upper case letter.
Example ¶
package main
import (
"solod.dev/so/fmt"
"solod.dev/so/unicode"
)
func main() {
fmt.Printf("%t\n", unicode.IsUpper('A'))
fmt.Printf("%t\n", unicode.IsUpper('a'))
}
Output: true false
func To ¶
To maps the rune to the specified case: UpperCase, LowerCase, or TitleCase.
Example ¶
package main
import (
"solod.dev/so/fmt"
"solod.dev/so/unicode"
)
func main() {
const lcG = 'g'
fmt.Printf("%#U\n", unicode.To(unicode.UpperCase, lcG))
fmt.Printf("%#U\n", unicode.To(unicode.LowerCase, lcG))
fmt.Printf("%#U\n", unicode.To(unicode.TitleCase, lcG))
const ucG = 'G'
fmt.Printf("%#U\n", unicode.To(unicode.UpperCase, ucG))
fmt.Printf("%#U\n", unicode.To(unicode.LowerCase, ucG))
fmt.Printf("%#U\n", unicode.To(unicode.TitleCase, ucG))
}
Output: U+0047 'G' U+0067 'g' U+0047 'G' U+0047 'G' U+0067 'g' U+0047 'G'
func ToLower ¶
ToLower maps the rune to lower case.
Example ¶
package main
import (
"solod.dev/so/fmt"
"solod.dev/so/unicode"
)
func main() {
const ucG = 'G'
fmt.Printf("%#U\n", unicode.ToLower(ucG))
}
Output: U+0067 'g'
Types ¶
type CaseRange ¶
CaseRange represents a range of Unicode code points for simple (one code point to one code point) case conversion. The range runs from Lo to Hi inclusive, with a fixed stride of 1. Deltas are the number to add to the code point to reach the code point for a different case for that character. They may be negative. If zero, it means the character is in the corresponding case. There is a special case representing sequences of alternating corresponding Upper and Lower pairs. It appears with a fixed Delta of
{UpperLower, UpperLower, UpperLower}
The constant UpperLower has an otherwise impossible delta value.
type Range16 ¶
Range16 represents of a range of 16-bit Unicode code points. The range runs from Lo to Hi inclusive and has the specified stride.
type Range32 ¶
Range32 represents of a range of Unicode code points and is used when one or more of the values will not fit in 16 bits. The range runs from Lo to Hi inclusive and has the specified stride. Lo and Hi must always be >= 1<<16.
type RangeTable ¶
type RangeTable struct {
R16 []Range16
R32 []Range32
LatinOffset int // number of entries in R16 with Hi <= MaxLatin1
}
RangeTable defines a set of Unicode code points by listing the ranges of code points within the set. The ranges are listed in two slices to save space: a slice of 16-bit ranges and a slice of 32-bit ranges. The two slices must be in sorted order and non-overlapping. Also, R32 should contain only values >= 0x10000 (1<<16).