Utility functions to manipulate strings.
More...
#include <inttypes.h>
#include <stdio.h>
Go to the source code of this file.
|
static size_t | hex_uint64_t (uint64_t n, char *str) |
| Returns uint64_t hexadecimal string (16 characters). More...
|
|
static uint64_t | parse_hex_uint64_t (const char *s) |
| Parses a 16 chars hexadecimal string and returns the code. More...
|
|
Collection of utility functions to manipulate strings.
static size_t hex_uint64_t |
( |
uint64_t |
n, |
|
|
char * |
str |
|
) |
| |
|
inlinestatic |
- Parameters
-
n | Number to parse |
str | String buffer to be returned (it must be sized 17 bytes at least). |
- Returns
- Upon successful return, these function returns the number of characters processed (excluding the null byte used to end output to strings). If the buffer size is not sufficient, then the return value is the number of characters required for buffer string, including the terminating null byte.
static uint64_t parse_hex_uint64_t |
( |
const char * |
s | ) |
|
|
inlinestatic |
- Parameters
-
s | Hexadecimal string to parse (it must contain 16 hexadecimal characters). |
- Returns
- uint64_t unsigned integer number.