Internationalization and localization tools


Character Manipulation Function

char* _itoa(int value, char* string, int radix);

wchar_t* _itow(int value, wchar_t* string, int radix);

TCHAR* _itot(int value, TCHAR* string, int radix);

Internationalization (I18n) Function Overview

The _itoa function converts the integer value to a null-terminated character string and stores the result (up to 33 single-byte characters) in string. No overflow checking is performed, and the return is a pointer to string. radix specifies the base of value and must be in the range 2 - 36. If radix equals 10 and value is negative, the first character of the stored string is the minus sign (-).

_itow is the wide-character version of _itoa, storing up to 33 wide characters.

_itot is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _itoa or _itow.

I18n Issues

Use the appropriate version of the function as required for internationalization support, noting the following:

These functions are not locale-dependent and should not be used for negative decimal values, which enforces the placement and symbol of the negative sign, rather than relying on the settings of the user's current locale. Instead, use one of the sprintf functions.

In addition, consider using the more secure versions, _itoa_s, _itow_s, _itot_s, if available.

Recommended Replacements*

*If you're already using the recommended function, see I18n Issues for other reasons why Globalyzer is detecting the function.

Character Manipulation Functions

 

Lingoport internationalization and localization services and software