#include <xtend/string.h>
-lxtend
char *ltostrn(char string[], long val, unsigned base, size_t maxlen)
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)
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.
A pointer to the converted string, or NULL if the string buffer was not big
enough for all the digits