C

package
v1.4105.455 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2024 License: MIT Imports: 0 Imported by: 0

README

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)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlpha

func IsAlpha[T charOrRune](ch T) bool

IsAlpha check whether the character is a letter or not

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

func IsDigit

func IsDigit[T charOrRune](ch T) bool

IsDigit check whether the character is a digit or not

C.IsDigit('9') // true

func IsIdent

func IsIdent[T charOrRune](ch T) bool

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

C.IsIdent('9'))

func IsIdentStart

func IsIdentStart[T charOrRune](ch T) bool

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

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

func IsValidFilename

func IsValidFilename[T charOrRune](ch T) bool

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

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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL