ctype

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UPPER     = 0x01       /* upper case letter[A-Z] */
	LOWER     = 0x02       /* lower case letter[a-z] */
	DIGIT     = 0x04       /* digit[0-9] */
	UNDERLINE = 0x08       /* underline[_] */
	XDIGIT    = 0x10       /* xdigit[0-9a-fA-F] */
	EOL       = 0x20       /* [\r\n] */
	ADD       = 0x40       /* [+] */
	SUB       = 0x80       /* [-] */
	MUL       = 0x100      /* [*] */
	DIV       = 0x200      /* [/] */
	LT        = 0x400      /* [<] */
	GT        = 0x800      /* [>] */
	EQ        = 0x1000     /* [=] */
	RDIV      = 0x2000     /* [\\], right-division, anti-slash */
	DOT       = 0x4000     /* [.] */
	COLON     = 0x8000     /* [:], colon */
	PERCENT   = 0x10000    /* [%] */
	AND       = 0x20000    /* [&] */
	OR        = 0x40000    /* [|] */
	SPACE_BAR = 0x80000    /* [ ] */
	LCAP_R    = 0x100000   /* [r] */
	LCAP_T    = 0x200000   /* [t] */
	LCAP_N    = 0x400000   /* [n] */
	LCAP_W    = 0x800000   /* [w] */
	COMMA     = 0x1000000  /* [,] */
	SEMICOLON = 0x2000000  /* [;] */
	TAB       = 0x4000000  /* [\t] */
	QUOT      = 0x8000000  /* ["] */
	BACKTICK  = 0x10000000 /* [`] */
)
View Source
const (
	BLANK                = SPACE_BAR
	TSPACE               = TAB | EOL
	SPACE                = SPACE_BAR | TSPACE
	PATH_SEP             = DIV | RDIV
	ALPHA                = UPPER | LOWER
	SYMBOL_FIRST_CHAR    = ALPHA
	SYMBOL_NEXT_CHAR     = SYMBOL_FIRST_CHAR | DIGIT
	CSYMBOL_FIRST_CHAR   = ALPHA | UNDERLINE
	CSYMBOL_NEXT_CHAR    = CSYMBOL_FIRST_CHAR | DIGIT
	XMLSYMBOL_FIRST_CHAR = CSYMBOL_FIRST_CHAR
	XMLSYMBOL_NEXT_CHAR  = CSYMBOL_NEXT_CHAR | SUB
	DOMAIN_CHAR          = ALPHA | DIGIT | SUB | ADD | DOT
	BASE64               = ALPHA | DIGIT | ADD | DIV       // [a-zA-Z0-9+/]
	URLSAFE_BASE64       = ALPHA | DIGIT | SUB | UNDERLINE // [a-zA-Z0-9\-_]
)

Variables

This section is empty.

Functions

func Is

func Is(typeMask uint32, c rune) bool

func IsCSymbol

func IsCSymbol(str string) bool

func IsType

func IsType(typeMask uint32, str string) bool

func IsTypeEx

func IsTypeEx(typeFirst, typeNext uint32, str string) bool

func IsXmlSymbol

func IsXmlSymbol(str string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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