package hex
import "cuelang.org/go/pkg/encoding/hex"
Index ¶
- func Decode(s string) ([]byte, error)
- func DecodedLen(x int) int
- func Dump(data []byte) string
- func Encode(src []byte) string
- func EncodedLen(n int) int
Functions ¶
func Decode ¶
Decode returns the bytes represented by the hexadecimal string s.
Decode expects that src contains only hexadecimal characters and that src has even length. If the input is malformed, Decode returns the bytes decoded before the error.
func DecodedLen ¶
DecodedLen returns the length of a decoding of x source bytes. Specifically, it returns x / 2.
func Dump ¶
Dump 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.
func Encode ¶
Encode returns the hexadecimal encoding of src.
func EncodedLen ¶
EncodedLen returns the length of an encoding of n source bytes. Specifically, it returns n * 2.
Source Files ¶
hex.go manual.go pkg.go
- Version
- v0.12.0 (latest)
- Published
- Jan 30, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 8 hours ago –
Tools for package owners.