Skip to content

std/unicode

import "github.com/eugenioenko/goalchemy/std/unicode"

Package unicode classifies runes and maps their case using the Unicode tables of the reference Go toolchain.

const (
MaxRune = '\U0010FFFF'
ReplacementChar = '�'
MaxASCII = '\u007F'
MaxLatin1 = 'ÿ'
)
const Version = "17.0.0"

Version is the Unicode edition the tables are derived from.

func IsControl(r rune) bool

IsControl reports whether r is a control character.

func IsDigit(r rune) bool

IsDigit reports whether r is a decimal digit (category Nd).

func IsGraphic(r rune) bool

IsGraphic reports whether r is a graphic character, including Unicode spaces.

func IsLetter(r rune) bool

IsLetter reports whether r is a letter (category L).

func IsLower(r rune) bool

IsLower reports whether r is a lower case letter.

func IsMark(r rune) bool

IsMark reports whether r is a mark (category M).

func IsNumber(r rune) bool

IsNumber reports whether r is a number (category N).

func IsPrint(r rune) bool

IsPrint reports whether r is printable as defined by Go: letters, marks, numbers, punctuation, symbols, and the ASCII space.

func IsPunct(r rune) bool

IsPunct reports whether r is punctuation (category P).

func IsSpace(r rune) bool

IsSpace reports whether r is a white space character as defined by Go.

func IsSymbol(r rune) bool

IsSymbol reports whether r is a symbol (category S).

func IsTitle(r rune) bool

IsTitle reports whether r is a title case letter.

func IsUpper(r rune) bool

IsUpper reports whether r is an upper case letter.

func SimpleFold(r rune) rune

SimpleFold iterates over the runes equivalent to r under Unicode simple case folding, returning the smallest equivalent rune greater than r, or the smallest equivalent rune if none is greater.

func ToLower(r rune) rune

ToLower maps r to lower case.

func ToTitle(r rune) rune

ToTitle maps r to title case.

func ToUpper(r rune) rune

ToUpper maps r to upper case.