Updated: April 19, 2023 |
Write a GUID as a hexadecimal string to a character buffer
#include <pips/pips.h>
int pips_guid_format(const pips_guid_t *const guid, char *buffer, const size_t buffer_size)
This function encodes (formats) the current GUID as a hexadecimal string and writes the result in the given buffer. The formatted GUID occupies 32 bytes and the NULL-terminator occupies one extra byte; the buffer must be large enough to accommodate this.
On success, the number of characters written to the buffer, excluding the NULL-terminator. On error, a negative value (errno is set).