MCPcopy
hub / github.com/google/uuid / xtob

Function xtob

util.go:40–44  ·  view source on GitHub ↗

xtob converts hex characters x1 and x2 into a byte.

(x1, x2 byte)

Source from the content-addressed store, hash-verified

38
39// xtob converts hex characters x1 and x2 into a byte.
40func xtob(x1, x2 byte) (byte, bool) {
41 b1 := xvalues[x1]
42 b2 := xvalues[x2]
43 return (b1 << 4) | b2, b1 != 255 && b2 != 255
44}
45
46// Compare returns an integer comparing two uuids lexicographically. The result will be 0 if a == b, -1 if a < b, and +1 if a > b.
47func Compare(a, b UUID) int {

Callers 3

ParseFunction · 0.85
ParseBytesFunction · 0.85
ValidateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected