Everything

wcstoimax / wcstoumax


Converts a number-representing string to an intmax_t or uintmax_t type integer.

[Format]

#include <stddef.h>

#include <inttypes.h>

intmax_t wcstoimax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, long base);

uintmax_t wcstoumax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, long base);

[Parameters]

nptr Pointer to a number-representing string to be converted

endptr Pointer to the storage area containing a pointer to the first character that does not represent an integer

base Radix of conversion (0 or 2 to 36)

[Return Values]

Normal: If the string pointed by nptr begins with a character that does not represent an integer: 0

If the string pointed by nptr begins with a character that represents an integer: Converted data as an intmax_t type integer

Abnormal: If the converted data overflows: INTMAX_MAX, INTMAX_MIN, or UINTMAX_MAX

[Remarks]

If the converted result overflows, ERANGE is set in errno.

The wcstoimax and wcstoumax functions are equivalent to the wcstol, wcstoll, wcstoul, and wcstoull functions, except that the initial part of the string is respectively converted to intmax_t and uintmax_t integers.