Integer to ASCII conversion: itoa(), utoa(), ltoa() and ultoa().
More...
#include <string.h>
|
| char * | ltoa (long value, char *string, int radix) |
| | Convert a long to a null-terminated string.
|
| |
| char * | ultoa (unsigned long value, char *string, int radix) |
| | Convert an unsigned long to a null-terminated string.
|
| |
| char * | itoa (int value, char *string, int radix) |
| | Convert an int to a null-terminated string.
|
| |
| char * | utoa (unsigned value, char *string, int radix) |
| | Convert an unsigned int to a null-terminated string.
|
| |
Integer to ASCII conversion: itoa(), utoa(), ltoa() and ultoa().
◆ itoa()
| char * itoa |
( |
int |
value, |
|
|
char * |
string, |
|
|
int |
radix |
|
) |
| |
Convert an int to a null-terminated string.
- Parameters
-
| value | Value to convert. Negative values are only signed for radix 10. |
| string | Buffer to write the result to. Must be large enough for the result. |
| radix | Base to use, from 2 to 36. |
- Returns
- Pointer to string, or NULL if string is NULL or radix is out of range.
◆ ltoa()
| char * ltoa |
( |
long |
value, |
|
|
char * |
string, |
|
|
int |
radix |
|
) |
| |
Convert a long to a null-terminated string.
- Parameters
-
| value | Value to convert. Negative values are only signed for radix 10. |
| string | Buffer to write the result to. Must be large enough for the result. |
| radix | Base to use, from 2 to 36. |
- Returns
- Pointer to string, or NULL if string is NULL or radix is out of range.
◆ ultoa()
| char * ultoa |
( |
unsigned long |
value, |
|
|
char * |
string, |
|
|
int |
radix |
|
) |
| |
Convert an unsigned long to a null-terminated string.
- Parameters
-
| value | Value to convert. |
| string | Buffer to write the result to. Must be large enough for the result. |
| radix | Base to use, from 2 to 36. |
- Returns
- Pointer to string, or NULL if string is NULL or radix is out of range.
◆ utoa()
| char * utoa |
( |
unsigned |
value, |
|
|
char * |
string, |
|
|
int |
radix |
|
) |
| |
Convert an unsigned int to a null-terminated string.
- Parameters
-
| value | Value to convert. |
| string | Buffer to write the result to. Must be large enough for the result. |
| radix | Base to use, from 2 to 36. |
- Returns
- Pointer to string, or NULL if string is NULL or radix is out of range.