parse_timestamp()#
parse_timestamp converts a string representation of a number into an unsigned integer using the specified base.
Prototype
uintmax_t parse_timestamp(
const char *str,
char **endptr,
int base
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
Pointer to the null-terminated string containing the number to convert. |
|
|
Pointer to a character pointer that will be set to the first invalid character after the number. |
|
|
Numerical base to use for conversion (e.g., 10 for decimal, 16 for hexadecimal). |
Return Value
Returns the converted unsigned integer value. If no valid conversion is performed, returns UINTMAX_MAX.
Notes
This function is a wrapper around strtoumax, ensuring safe conversion of string-based timestamps.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples