int/to-bytes
core-api
cfunction
src/core/inttypes.c on line 237, column 1
(int/to-bytes val &opt endianness buf)
Write the bytes of an `int/s64` or `int/u64`, `val`, into a buffer.
The optional `buf` parameter is an existing buffer to write to; if
not provided, a new buffer will be created. Returns the modified
buffer.
The `endianness` parameter indicates the byte order:
* `:be` - big-endian, most significant byte first
* `:le` - little-endian, least significant byte first
* `nil` or unset - system byte order