Name
wcstoimax
Synopsis
Converts a wide string into an integer value with type
intmax_t
#include <stddef.h> #include <inttypes.h> intmax_twcstoimax
( const wchar_t * restrictwcs
, wchar_t ** restrictendptr
, intbase
);
The wcstoimax()
function is
similar to wcstol()
, except that
it converts a wide string to an integer value of type intmax_t
. If the conversion fails,
wcstoimax()
returns 0. If the
result of the conversion exceeds the range of the type intmax_t
, then the wcstoimax()
returns INTMAX_MAX
or INTMAX_MIN
, and sets the errno
variable to the value of ERANGE
(“range error”).
Example
See the example for the analogous function wcstoumax()
in this
chapter.
See Also
wcstoumax()
, wcstol()
, and wcstoul()
; wcstod()
, wcstof()
, and wcstold()
; strtoimax()
and
strtoumax()
Get C in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.