wcstoul, wcstoull


wcstoul, wcstoull

Converts a wide string into an unsigned long (or unsigned long long) integer value

 #include <wchar.h> unsigned long int wcstoul ( const wchar_t * restrict wcs ,                            wchar_t ** restrict endptr , int base  ); unsigned long long int wcstoull ( const wchar_t * restrict wcs ,                                  wchar_t ** restrict endptr ,                                  int base  );      (C99) 

The wcstoul( ) function attempts to interpret the wide string addressed by its first pointer argument, wcs, as an integer numeric value, and returns the result with the type unsigned long. wcstoull( ) is similar, but returns unsigned long long. These functions are the wide-string equivalents of strtoul( ) and strtoull( ), and they work in the same way, except that they operate on strings of wchar_t rather than char. See the description for strtol( ) in this chapter.

If the resulting value is outside the range of the function's type, then the return value is ULONG_MAX, depending on the sign (or ULLONG_MAX, for wcstoull( )), and the errno variable is set to the value of ERANGE ("range error").

Example

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

See Also

wcstol( ), wcstod( ), wcstof( ), and wcstold( ); strtol( ) and strtoul( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net