Convert among numerical types and wide-character strings.
#include <wchar.h> double wcstod(wchar_t * str, char ** end); float wcstof(const wchar_t * restrict nptr, wchar_t ** restrict endptr); long int wcstol(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); long double wcstold(const wchar_t * restrict nptr, wchar_t ** restrict endptr); long long int wcstoll(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); unsigned long int wcstoul(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); unsigned long long int wcstoull( const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base);
These functions operate identically to their counterpart functions in stdlib.h. But instead of operating on character strings, these functions operate on wide character strings.
| Function | Wide Character Equivalent |
|---|---|
| wcstod() | strtod() |
| wcstof() | strtof() |
| wcstol() | strtol() |
| wcstoll() | strtoll() |
| wcstoul() | strtoul() |
| wcstoull() | strtoull() |