@c ----------------------------------------------------------------------
@node itoa, string
@heading @code{itoa}
@subheading Syntax

@example
#include <stdlib.h>

char *    itoa(int value, char *buffer, int radix);
@end example

@subheading Description

This function converts an integer @var{value} to it's string
representation.  If @var{radix} is 10, the value is treated as a
signed value, and the resulting string may have a prepended minus
sign.  For all other values of @var{radix}, the value is treated as
unsigned.

The buffer you pass must be large enough to hold the largest returned
string.  Since @var{radix} must be in the range 2 through 36, the
largest buffer would be 33 characters (including the trailing null).
If you pass NULL for the @var{buffer}, one is allocated for you, which
you must later free.

For values of @var{radix} larger than 10, characters in the range
@code{a} through @code{z} are used to represent the digits after
@code{9}.

@subheading Return Value

A pointer to @var{buffer} or the allocated buffer.

@subheading Example

@example
char buf[33];
itoa(val, buf, 16);
printf("%d = 0x%s\n", val, buf);
@end example

