Standard library / unicode

unicode.Scripts

Maps Unicode script names to range tables. A script is not a language identifier: Arabic script is used by Persian and other languages. Expected stdout: 'true true\n'.

Formal Syntax & Structure

go syntaxgo
var Scripts map[string]*RangeTable

Working Example

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