MCPcopy
hub / github.com/go-yaml/yaml / is_alpha

Function is_alpha

yamlprivateh.go:48–50  ·  view source on GitHub ↗

Check if the character at the specified position is an alphabetical character, a digit, '_', or '-'.

(b []byte, i int)

Source from the content-addressed store, hash-verified

46// Check if the character at the specified position is an alphabetical
47// character, a digit, '_', or '-'.
48func is_alpha(b []byte, i int) bool {
49 return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-'
50}
51
52// Check if the character at the specified position is a digit.
53func is_digit(b []byte, i int) bool {

Calls

no outgoing calls

Tested by

no test coverage detected