Converts a string to a #guint64 value.
This function behaves like the standard
does in the C locale. It does this without actually
changing the current locale, since that would not be thread-safe.
Note that input with a leading minus sign (
-) is accepted, and will return
the negation of the parsed number, unless that would overflow a #guint64.
Critically, this means you cannot assume that a short fixed length input will
never result in a low return value, as the input could have a leading
This function is typically used when reading configuration
files or other non-user input that should be locale independent.
To handle input from the user you should normally use the
If the correct value would cause overflow,
is returned, and
ERANGE is stored in
If the base is outside the valid range, zero is returned, and
EINVAL is stored in
If the string conversion fails, zero is returned, and
endptr is non-
Available since: 2.2
The string to convert to a numeric value.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string.
NULL, it returns the character after the last character used in the conversion.
The argument will be set by the function. The argument can be
The data is owned by the function. The value is a NUL terminated UTF-8 string.
To be used for the conversion, 2..36 or 0