Name
afc_string_radix -- Rappresents a number using the given base
Synopsis
int afc_string_radix
( char * string, long number, int base );
Description
This function converts the passed number into a string in the given base and copies
the result in string. You can generate string rappresenting a number with base ranging
from 1 to 64.
Inputs
- string
Destination AFC string.
- number
The number to convert.
- base
The new base. It can range from 1 to 64.
Result
- 0
The convertion worked properely
- non zero
Something went wrong.
Note
This function can handle NULL pointers.
These are the chars used in the base: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_@"
please note that, since the function uses both lower and upper chars, case does matter.