Locale-Sensitive C/C++ String Operation Function
char *_strrev(char *string);
unsigned char *_mbsrev(unsigned char *string);
wchar_t *_wcsrev(wchar_t *string);
_TXCHAR *_tcsrev(_TXCHAR *string);
Internationalization (I18n) Function Overview
The _strrev function reverses the order of the characters in string , leaving the null-terminator in its place.
Use _wcsrev or _mbsrev for wide character or multibyte equivalent. For _mbsrev , the order of bytes in each multibyte character in string is not changed.
_tcsrev is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _mbsrev or _wcsrev .
I18n Issues
For Windows MBCS platforms, ensure that the multibyte code page is set properly, as _mbsrev 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
|