Utility functions for converting from integer to ASCII representations. More...
Go to the source code of this file.
Functions | |
char * | embtextf_itoa (int value, char *str, int radix) |
char * | embtextf_utoa (unsigned int value, char *str, int radix) |
char * | embtextf_ltoa (long value, char *str, int radix) |
char * | embtextf_ultoa (unsigned long value, char *str, int radix) |
char * | embtextf_lltoa (long long value, char *str, int radix) |
char * | embtextf_ulltoa (unsigned long long value, char *str, int radix) |
Utility functions for converting from integer to ASCII representations.
The routines in this module convert signed and unsigned int
and long
values into text expressed in base 2 through base 36 and stored a user-provided buffer.
char* embtextf_itoa | ( | int | value, |
char * | str, | ||
int | radix | ||
) |
Convert value into text representation.
The value is converted into a base-radix ASCII representation. If the radix is 10 and value is negative a minus sign will be generated prior to representation of the absolute value of the input.
value | the number to be converted |
str | a buffer of sufficient size to hold the ASCII representation of the value in the given base, including a terminating NUL. Passing an insufficiently large buffer results in undefined behavior. |
radix | the radix for the ASCII representation. Valid values are 2 through 36. Multiples greater than 9 are represented by capitalized alphabetics beginning with A (10) and continuing through Z (35). Passing an invalid value results in undefined behavior. |
char* embtextf_lltoa | ( | long long | value, |
char * | str, | ||
int | radix | ||
) |
As with itoa() but for long long integers.
char* embtextf_ltoa | ( | long | value, |
char * | str, | ||
int | radix | ||
) |
As with itoa() but for long integers.
char* embtextf_ulltoa | ( | unsigned long long | value, |
char * | str, | ||
int | radix | ||
) |
As with itoa() but for unsigned long long integers.
char* embtextf_ultoa | ( | unsigned long | value, |
char * | str, | ||
int | radix | ||
) |
As with itoa() but for unsigned long integers.
char* embtextf_utoa | ( | unsigned int | value, |
char * | str, | ||
int | radix | ||
) |
As with itoa() but for unsigned integers.