MCPcopy Create free account
hub / github.com/expr-lang/expr / unhex

Function unhex

parser/lexer/utils.go:339–350  ·  view source on GitHub ↗
(b byte)

Source from the content-addressed store, hash-verified

337}
338
339func unhex(b byte) (rune, bool) {
340 c := rune(b)
341 switch {
342 case '0' <= c && c <= '9':
343 return c - '0', true
344 case 'a' <= c && c <= 'f':
345 return c - 'a' + 10, true
346 case 'A' <= c && c <= 'F':
347 return c - 'A' + 10, true
348 }
349 return 0, false
350}

Callers 2

unescapeCharFunction · 0.85
unescapeByteCharFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…