Previous Page
Next Page


Converts a wide string into an integer value with type intmax_t

#include <stddef.h>
#include <inttypes.h>
intmax_t wcstoimax ( const wchar_t * restrict wcs ,
                    wchar_t ** restrict endptr , int base  );

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").


See the example for the analogous function wcstoumax( ) in this chapter.

See Also

wcstoumax( ), wcstol( ), and wcstoul( ); wcstod( ), wcstof( ), and wcstold( ); strtoimax( ) and strtoumax( )

Previous Page
Next Page