xt_ltostrn(3)

NAME
xt_ltostrn() - Convert a long to a string in any base from 2 to 36

LIBRARY
#include <xtend/string.h>
-lxtend

SYNOPSIS
char    *xt_ltostrn(char string[], long val, unsigned base, size_t maxlen)

ARGUMENTS
string: char array to receive ascii text
val:    value to convert to ascii
base:   number base for conversion, must be between 2 and 36
maxlen: size of 'string' array - 1 (to account for null byte)

DESCRIPTION
xt_ltostrn() is a small, fast integer to string converter that can convert using any base from 2 to 36. It is the converse of strtol(3). The size of the char buffer passed should be 1 more than maxlen to allow for a null byte.

RETURN VALUES
A pointer to the converted string, or NULL if the string buffer was not big enough for all the xt_digits

SEE ALSO
strtol(3)