MCPcopy Create free account
hub / github.com/buger/jsonparser / hexDigit

Function hexDigit

json_fuzz_test.go:485–491  ·  view source on GitHub ↗

hexDigit returns a single lowercase hexadecimal digit byte.

(r *rand.Rand)

Source from the content-addressed store, hash-verified

483
484// hexDigit returns a single lowercase hexadecimal digit byte.
485func hexDigit(r *rand.Rand) byte {
486 d := r.Intn(16)
487 if d < 10 {
488 return byte('0' + d)
489 }
490 return byte('a' + d - 10)
491}
492
493// hexChars is the lowercase hex alphabet used by appendUnicodeEscape.
494const hexChars = "0123456789abcdef"

Callers 2

genKeyFunction · 0.85
genStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected