SYNOPSIS
#include <stdlib.h>
long strtol(const char *nptr, char **endptr, int base);
long long strtoll(const char *nptr, char **endptr, int base);
quad_t strtoq(const char *nptr, char **endptr, int base);
long strtol_l(const char *nptr, char **endptr, int base, locale_t locale);
long long strtoll_l(const char *nptr, char **endptr, int base, locale_t locale);
#include <inttypes.h>
intmax_t strtoimax(const char *nptr, char **endptr, int base);
intmax_t strtoimax_l(const char *nptr, char **endptr, int base, locale_t locale);
DESCRIPTION
The
If base is non-zero, its value determines the set of recognized digits and overrides the optional base indicator character. If base is zero, nptr is assumed to be base 10, unless an optional base indicator character is given.
PARAMETERS
- nptr
-
Points to a character string for
strtol() to convert. - endptr
-
Is a result parameter that, if not NULL, returns a string beginning with the first character that
strtol() does not attempt to convert. - base
-
Is the base of the string, a value between 0 and 36.
- locale
-
Is a locale_t perhaps returned by
newlocale() or LC_GLOBAL_LOCALE or 0 for the current thread locale set withuselocale() .
RETURN VALUES
The
CONFORMANCE
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
atoi() ,atol() ,newlocale() ,setlocale() ,strtod() ,strtod_l() ,strtof() ,strtof_l() ,strtold() ,strtold_l() ,strtoul() ,strtoul_l() ,strtoull() ,strtoull_l() ,strtoumax() ,strtoumax_l() ,strtouq()
PTC MKS Toolkit 10.4 Documentation Build 39.