INNER CODE UNIT · Go
getCharCategory
asciimoo/wuzz · commands.go:213
func getCharCategory(chr rune) int {
switch {
case unicode.IsDigit(chr):
return 0
case unicode.IsLetter(chr):
return 1
case unicode.IsSpace(chr):
return 2
case unicode.IsPunct(chr):
return 3
}
return int(chr)
}
func quit(g *gocui.Gui, v *gocui.View) error {
return gocui.ErrQuit
}