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

Function is_hex

yamlprivateh.go:63–65  ·  view source on GitHub ↗

Check if the character at the specified position is a hex-digit.

(b []byte, i int)

Source from the content-addressed store, hash-verified

61
62// Check if the character at the specified position is a hex-digit.
63func is_hex(b []byte, i int) bool {
64 return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f'
65}
66
67// Get the value of a hex-digit.
68func as_hex(b []byte, i int) int {

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected