Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)
wcstoll(3) Guardian Native C Library Calls Reference Manual
NAME
wcstoll - Converts a wide-character string to a long long integer
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
H-series OSS processes: /G/system/zdllnnn/zcrtldll
SYNOPSIS
#include <wchar.h>
long long int wcstoll(
const wchar_t *nptr,
wchar_t **endptr,
int base);
PARAMETERS
nptr Contains a pointer to the wide-character string to be converted to long long
integer representation.
endptr Points to a pointer in which the wcstol() function stores the position in the string
specified by the nptr parameter where a wide character is found that is not a
valid character for the purpose of this conversion.
base Specifies the radix in which the characters are interpreted.
DESCRIPTION
The wcstoll() function converts the initial portion of the wide-character string pointed to by the
nptr parameter to a long long integer representation. The input wide-character string is
first bro-
ken down into three parts:
• White space -- an initial (possibly empty) sequence of wide-character spaces (as
specified by the iswspace() function)
• Subject sequence -- a sequence of wide characters that are valid in an integer constant of
the radix determined by the base parameter
• Unrecognized characters -- final sequence of unrecognized wide-character codes, includ-
ing the terminating null wide character
If possible, the subject is then converted to an integer and the result is returned.
The base parameter can take values between 0 and 36.
• If the base value is 0 (zero), the subject string can be a decimal, octal, or hexadecimal
integer constant. A decimal constant begins with a nonzero digit, and consists of a
sequence of decimal digits. An octal constant consists of the prefix 0 (zero) optionally
followed by a sequence of digits in the range 0 through 7. A hexadecimal constant con-
sists of the prefix 0x or oX followed by a sequence consisting of decimal digits and the
letters in the range a (or A) to f (or F).
• If the base value is between 2 and 36, the subject string can be a sequence of digits and
letters a (or A) to z ( or Z ) that are used to represent an integer in the specified base.
Alphabetic characters represent digits with an equivalent decimal value from 10 (for the
letter A) to 35 (for the letter Z). The subject string can only have digits with a value less
than base and alphabetic characters with equivalent values less than base. For example,
when the value of the base parameter is 20, only the following value assignments are
converted:
7−80 Hewlett-Packard Company 527192-007