Internationalization and localization tools


Locale-Sensitive C/C++ String Operation Function

char *_strdec(const char *start, const char *current);

unsigned char *_mbsdec(const unsigned char *start, const unsigned char *current);

wchar_t *_wcsdec(const wchar_t *start, const wchar_t *current);

_TXCHAR *_tcsdec(const _TXCHAR *start, const _TXCHAR *current);

Internationalization (I18n) Function Overview

Returns a pointer to the character immediately preceding the character at current.

Use _wcsdec or _mbsdec for wide character and multibyte equivalents.

_tcsdec is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _mbsdec or _wcsdec.

I18n Issues

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

For Windows MBCS platforms, ensure that the multibyte code page is set properly, as _mbsdec depends on it. By default, the multibyte code page is set to the system-default ANSI code page obtained from the operating system at program startup. Use _getmbcp and _setmbcp to query or change the current multibyte code page, respectively.

Recommended Function Replacements

Locale-Sensitive C/C++ String Operation Functions

 

Lingoport internationalization and localization services and software