1 .TH STRTOL 3 "December 9, 2009"
4 strtol, strtoll, strtoul, strtoull \- convert string to number
10 long strtol(const char *\fInptr\fP, char **\fIendptr\fP, int \fIbase\fP);
11 unsigned long strtoul(const char *\fInptr\fP, char **\fIendptr\fP, int \fIbase\fP);
12 #ifdef __LONG_LONG_SUPPORTED
13 long long strtoll(const char *\fInptr\fP, char **\fIendptr\fP, int \fIbase\fP);
14 unsigned long long strtoull(const char *\fInptr\fP, char **\fIendptr\fP, int \fIbase\fP);
18 These functions parse as much from the string \fInptr\fP as possible and return
19 it as an integer. The string should consist of any number of whitespace
20 characters followed by a sign (either plus or minus) and at least one digit in
21 the specified \fIbase\fP. The digits of a hexadecimal string may be preceded by
22 the prefix 0x or 0X, which is ignored. If \fIbase\fP is zero, hexadecimal is
23 assumed if this prefix is present, octal is assumed if there is a leading zero
24 and decimal is assumed otherwise. If not zero, \fIbase\fP must be at least 2
25 and at most 36. A pointer to the first character following the numeric string is
26 stored in *\fIendptr\fP.
28 Note that the strtoll and strtoull functions, which return 64-bit values,
29 are supported only on GCC as ACK does not support 64-bit arithmatic.
31 The parsed number is returned.