Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
strtoull(3) Guardian Native C Library Calls Reference Manual
NAME
strtoull - Converts a string to an unsigned long long integer
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <stdlib.h>
unsigned long long int strtoull (
const char *nptr,
char **endptr,
int base );
PARAMETERS
nptr Points to the character string to convert.
endptr Points to a pointer in which the function stores the position in the string specified
by the nptr parameter where a character is found that is not a valid character for
the purpose of this conversion.
base Specifies the radix to use for the conversion.
DESCRIPTION
The strtoull() function converts the initial portion of the string pointed to by nptr to a type
unsigned long long integer representation. First the function decomposes the input string into
three parts:
• An initial, possibly empty, sequence of white-space characters (as specified by the
isspace() function)
• A subject sequence interpreted as an integer represented in some radix determined by the
value of base
• A final string of one or more unrecognized characters, including the terminating null byte
of the input string.
Then the function attempts to convert the subject sequence to an unsigned long long integer, and
returns the result. The expected form of the subject sequence depends on the value of base. base
can have values of 0 (zero) or between 2 and 36:
• If the value of base is 0 (zero), the expected form of the subject sequence is that of a
decimal constant, an octal constant, or a hexadecimal constant, any of which may be pre-
ceded by a + or - sign. A decimal constant begins with a nonzero digit and consists of a
sequence of decimal digits. An octal constant consists of the prefix 0 optionally fol-
lowed by a sequence of the digits 0 to 7 only. A hexadecimal constant consists of the
prefix 0x or 0X followed by a sequence of the decimal digits and letters a or A to f or F
with values 10 to 15 respectively.
• If the value of base is between 2 and 36, the expected form of the subject sequence is a
sequence of letters and digits representing an integer with the radix specified by base,
optionally preceded by a + or - sign. The letters from a or A to z or Z inclusive are
ascribed the values 10 to 35; only letters whose ascribed values are less than that of base
are permitted.
6−142 Hewlett-Packard Company 527192-018