![]() |
![]()
| ![]() |
![]()
NAMExt_ltostrn() - Convert a long to a string in any base from 2 to 36 LIBRARY#include <xtend/string.h> -lxtend SYNOPSISchar *xt_ltostrn(char string[], long val, unsigned base, size_t maxlen) ARGUMENTSstring: 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) DESCRIPTIONxt_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 VALUESA pointer to the converted string, or NULL if the string buffer was not big enough for all the xt_digits SEE ALSOstrtol(3)
|