Locale-Sensitive C/C++ String Operation Function
char *_strspnp(const char *string1, const char *string2);
unsigned char *_mbsspnp(const unsigned char *string1, const unsigned char *string2);
wchar_t *_wcsspnp(const wchar_t *string1, const wchar_t *string2);
_TXCHAR *_tcsspnp(const _TXCHAR *string1, const _TXCHAR *string2);
Internationalization (I18n) Function Overview
The function _strspnp returns a pointer to the first character in string1 that does not belong to
the specified character set in string2 . It returns NULL if string1 consists entirely of characters from string2.
_wcsspnp is the wide-character version of the function; its parameters and return value are wide characters.
_mbsspnp is the multibyte version of the function; its parameters and return value are multibyte characters.
_tcsspnp is the Windows-only Generic version of the function; with the _MBCS or _UNICODE compiler flags determining its mapping to either _mbsspnp or _wcsspnp .
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 _mbsspnp 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
|