Next: , Previous: , Up: Stdlib   [Contents][Index]


2.49 utoa—unsigned integer to string

Synopsis

#include <stdlib.h>
char *utoa(unsigned value, char *str, int base);
char *__utoa(unsigned value, char *str, int base);

Description
utoa converts the unsigned integer [<value>] to a null-terminated string using the specified base, which must be between 2 and 36, inclusive. str should be an array long enough to contain the converted value, which in the worst case is sizeof(int)*8+1 bytes.


Returns
A pointer to the string, str, or NULL if base is invalid.


Portability
utoa is non-ANSI.

No supporting OS subroutine calls are required.