MCPcopy Index your code
hub / github.com/dunglas/httpsfv / isExtendedTchar

Function isExtendedTchar

token.go:10–21  ·  view source on GitHub ↗

isExtendedTchar checks if c is a valid token character as defined in the spec.

(c byte)

Source from the content-addressed store, hash-verified

8
9// isExtendedTchar checks if c is a valid token character as defined in the spec.
10func isExtendedTchar(c byte) bool {
11 if isAlpha(c) || isDigit(c) {
12 return true
13 }
14
15 switch c {
16 case '!', '#', '$', '%', '&', '\'', '*', '+', '-', '.', '^', '_', '`', '|', '~', ':', '/':
17 return true
18 }
19
20 return false
21}
22
23// ErrInvalidTokenFormat is returned when a token format is invalid.
24var ErrInvalidTokenFormat = errors.New("invalid token format")

Callers 2

marshalSFVMethod · 0.85
parseTokenFunction · 0.85

Calls 2

isAlphaFunction · 0.85
isDigitFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…