Locale-Sensitive C/C++ String Operation Function
char *_strninc(const char *string, size_t count);
unsigned char *_mbsninc(const unsigned char *string, size_t count);
wchar_t *_wcsninc(const wchar_t *string, size_t count);
_TXCHAR *_tcsninc(const _TXCHAR *string, size_t count);
Internationalization (I18n) Function Overview
Returns a pointer to string after string has been incremented by count characters, or NULL if string is NULL .
Use _wcsninc or _mbsninc for wide character and multibyte equivalent.
_tcsninc is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _mbsninc or _wcsninc .
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 _mbsninc 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.
Special care must be taken with the count parameter. See Locale-Sensitive Length Functions for a complete discussion of the issues involved with functions that pass length parameters.
Recommended Function Replacements
Locale-Sensitive C/C++
String Operation Functions
|