encoding/hex
CUE v0.18.0
Functions
Decode
cue
Decode: func(s: string) -> bytesDecode returns the bytes represented by the hexadecimal string s.
Decode expects that s contains only hexadecimal characters and that s has even length. If the input is malformed, Decode returns the bytes decoded before the error.
DecodedLen
cue
DecodedLen: func(x: int) -> intDecodedLen returns the length of a decoding of x source bytes. Specifically, it returns x / 2.
Dump
cue
Dump: func(data: bytes | string) -> stringDump returns a string that contains a hex dump of the given data. The format of the hex dump matches the output of `hexdump -C` on the command line.
Encode
cue
Encode: func(src: bytes | string) -> stringEncode returns the hexadecimal encoding of src.
EncodedLen
cue
EncodedLen: func(n: int) -> intEncodedLen returns the length of an encoding of n source bytes. Specifically, it returns n * 2.