LTOSTR(3C)
NAME
ltostr, ultostr, ltoa, ultoa − convert long integers to strings
SYNOPSIS
char *ltostr (n, base)
long n;
int base;
char *ultostr (n, base)
unsigned long n;
int base;
char *ltoa (n)
long n;
char *ultoa (n)
unsigned long n;
DESCRIPTION
The functions ltostr and ultostr convert a signed or unsigned long integer to the corresponding string representation in the specified base. The argument base must be between 2 and 36, inclusive.
The functions ltoa and ultoa convert a signed or unsigned long integer to the corresponding base 10 string representation, returning a pointer to the result.
These functions are smaller and faster than using sprintf(3C) for simple conversions.
WARNINGS
The return values point to static data whose content is overwritten by each call.
ERRORS
If the value of base is not between 2 and 36, ltostr and ultostr return the value NULL and set the external variable errno to ERANGE.
AUTHOR
Ltostr, ultostr, ltoa and ultoa were developed by HP.
SEE ALSO
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989