JanetDocsPlaygroundI'm feeling luckyGitHub sign in

int/to-bytes



    cfunction
    src/core/inttypes.c on line 249, column 1

    (int/to-bytes value &opt endianness buffer)

    Write the bytes of an `int/s64` or `int/u64` into a buffer. The 
    `buffer` parameter specifies an existing buffer to write to, if 
    unset a new buffer will be created. Returns the modified buffer. 
    The `endianness` paramater indicates the byte order:

    * `nil` (unset): system byte order
    * `:le`: little-endian, least significant byte first
    * `:be`: big-endian, most significant byte first


0 examplesSign in to add an example
Loading...