pub unsafe extern "C" fn svn_cstring_strtoui64(
n: *mut apr_uint64_t,
str_: *const c_char,
minval: apr_uint64_t,
maxval: apr_uint64_t,
base: c_int,
) -> *mut svn_error_t
Expand description
Parse the C string @a str into an unsigned 64 bit number, and return it in @a *n. Assume that the number is represented in base @a base. Raise an error if conversion fails (e.g. due to overflow), or if the converted number is smaller than @a minval or larger than @a maxval.
Leading whitespace in @a str is skipped in a locale-dependent way. After that, the string may contain an optional ‘+’ (positive, default) or ‘-’ (negative) character, followed by an optional ‘0x’ prefix if @a base is 0 or 16, followed by numeric digits appropriate for the base. If there are any more characters after the numeric digits, an error is returned.
If @a base is zero, then a leading ‘0x’ or ‘0X’ prefix means hexadecimal, else a leading ‘0’ means octal (implemented, though not documented, in apr_strtoi64() in APR 0.9.0 through 1.5.0), else use base ten.
@warning The implementation used since version 1.7 returns an error if the parsed number is greater than APR_INT64_MAX, even if it is not greater than @a maxval.
@since New in 1.7.