Standard library / unicode

unicode.Categories

Maps Unicode general-category names to range tables. Use comma-ok lookup before testing; treat the map and tables as read-only. Expected stdout: 'true true\n'.

Formal Syntax & Structure

go syntaxgo
var Categories map[string]*RangeTable

Working Example

Example Snippetgo
package main
import (  "fmt"  "unicode")
func main() {  t, ok := unicode.Categories["Nd"]  fmt.Println(ok, unicode.Is(t, '۳'))}
Go Reference