Character Manipulation Function
char* _ltoa(long value, char* str, int radix);
wchar_t* _ltow(long value, wchar_t* str, int radix);
TCHAR* _ltot(long value, TCHAR* str, int radix);
Internationalization (I18n) Function Overview
The _ltoa function converts the long integer value to a null-terminated character string and stores the result (up to 33 single-byte characters) in str . 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 (-).
_ltow is the wide-character version of _ltoa , storing up to 33 wide characters.
_ltot is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _ltoa or _ltow .
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, _ltoa_s, _ltow_s, _ltot_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
|