pub unsafe extern "C" fn mp_int_read_string(
z: mp_int,
radix: mp_size,
str_: *const c_char,
) -> mp_result
Expand description
Reads a string of ASCII digits in the specified radix
from the zero
terminated str
provided into z
. For values of radix > 10
, the letters
A
..Z
or a
..z
are accepted. Letters are interpreted without respect
to case.
Leading whitespace is ignored, and a leading +
or -
is interpreted as a
sign flag. Processing stops when a NUL or any other character out of range
for a digit in the given radix is encountered.
If the whole string was consumed, MP_OK
is returned; otherwise
MP_TRUNC
. is returned.
Requires MP_MIN_RADIX <= radix <= MP_MAX_RADIX
.