SYNOPSIS
#include <wchar.h>
long wcstol(const wchar_t *nptr, wchar_t **endptr, int base);
DESCRIPTION
The
If the value of base is 0, then the expected form of the sequence to be converted must be that of a decimal constant, octal constant or a hexadecimal constant. Each of the may be preceded by a + or - sign. A decimal constant must begin with a non-zero digit and be followed by a sequence of decimal digits. An octal constant must begin with a 0 prefix an optionally followed by a sequence of digits ranging from 0 to 7. A hexadecimal constant must be preceded by a 0x or 0X and followed by a sequence of decimal digits and the letters a(A) to f(F) with the values of 10 to 15 respectively.
If the value of base is between 2 and 36, then the expected form of the sequence to be converted must be a sequence of digits and letters representing an integer with a radix defined by base. The letters a(A) through z(Z) represent the values from 10 to 35 respectively. Only letters whose value are less than base are permitted. If the value of base is 16, then the sequence to be converted may optionally be preceded by 0x or 0X.
A pointer to the final sequence of wide characters is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer.
PARAMETERS
- nptr
-
Is the null-terminated string to convert.
- endptr
-
Points to the character that stops scan.
- base
-
Is the number base to use.
RETURN VALUES
Upon successful completion the
- ERANGE
-
The value is outside the range of representable values.
- EINVAL
-
The conversion could not be performed or the value of base is not supported.
CONFORMANCE
ANSI/ISO 9899-1990/AM 1-1995.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
None.
AVAILABILITY
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
MKS Toolkit 9.2 Documentation Build 16.