Internationalization and localization tools


Locale-Sensitive C/C++ String Operation Functions

__int64 _strtoi64(const char *nptr, char **endptr, int base);

__int64 _wcstoi64(const wchar_t *nptr, wchar_t **endptr, int base);

__int64 _tcstoi64(const TCHAR *nptr, TCHAR **endptr, int base);

Internationalization (I18n) Function Overview

The _strtoi64 function returns the value represented in the string nptr, except when the representation would cause an overflow, in which case it returns I64_MAX or I64_MIN.

The current locale's LC_NUMERIC category setting determines recognition of the radix character in nptr; for more information, see setlocale. If endptr is not NULL, a pointer to the character that stopped the scan is stored at the location pointed to by endptr. If no conversion can be performed (no valid digits were found or an invalid base was specified), the value of nptr is stored at the location pointed to by endptr.

_wcstoi64 is the wide-character version of the function; its parameters are wide characters.

_tcstoi64 is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _strtoi64 or _wcstoi64.

I18n Issues

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

Ensure that the current locale is set properly.

Recommended Replacements*

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

Locale-Sensitive C/C++ String Operation Functions

 

Lingoport internationalization and localization services and software