Standard library / unicode

unicode.IsNumber()

Tests Unicode number category N, broader than decimal digits. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
func IsNumber(r rune) bool

Parameters & Attributes

NameTypeDescription
rruneUnicode code point.

Return Value

bool

Tests Unicode number category N, broader than decimal digits.

Working Example

Example Snippetgo
package main
import (  "fmt"  "unicode")
func main() {  fmt.Println(unicode.IsNumber('Ⅳ'))}
Go Reference