Skip to content

Latest commit

 

History

History

C

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

C

-- import "github.com/kokizzu/gotro/C"

Usage

func IsAlpha

func IsAlpha(ch byte) bool

IsAlpha check whether the character is a letter or not

C.IsDigit('a') // true
C.IsDigit('Z') // true

func IsDigit

func IsDigit(ch byte) bool

IsDigit check whether the character is a digit or not

C.IsDigit('9') // true

func IsIdent

func IsIdent(ch byte) bool

IsIdent check whether the character is a valid identifier suffix alphanumeric (letter/underscore/numeral)

C.IsIdent('9'))

func IsIdentStart

func IsIdentStart(ch byte) bool

IsIdentStart check whether the character is a valid identifier prefix (letter/underscore)

C.IsIdentStart('-') // false
C.IsIdentStart('_') // true

func IsValidFilename

func IsValidFilename(ch byte) bool

IsValidFilename check whether the character is a safe file-name characters (alphanumeric/comma/full-stop/dash)

C.IsValidFilename(' ') // output bool(true)