_mbsnextc, _mbsnextc_l, _strnextc, _wcsnextc
Finds the next character in a string.
unsigned int _mbsnextc( const unsigned char *str ); unsigned int _mbsnextc_l( const unsigned char *str, _locale_t locale ); unsigned int _strnextc( const char *str ); unsigned int _wscnextc( const wchar_t *str );
Parameters
- str
-
Source string.
- locale
-
Locale to use.
The _mbsnextc function returns the integer value of the next multibyte character in str, without advancing the string pointer. _mbsnextc recognizes multibyte-character sequences according to the multibyte code page currently in use.
If str is NULL, the invalid parameter handler is invoked, as described in Parameter Validation. If execution is allowed to continue, errno is set to EINVAL and the function returns 0.
Security Note This API incurs a potential threat brought about by a buffer overrun problem. Buffer overrun problems are a frequent method of system attack, resulting in an unwarranted elevation of privilege. For more information, see Avoiding Buffer Overruns.
| Tchar.h routine | _UNICODE and _MBCS not defined | _MBCS defined | _UNICODE defined |
|---|---|---|---|
| _tcsnextc | _strnextc | _mbsnextc | _wcsnextc |
_strnextc and _wcsnextc are single-byte–character string and wide-character string versions of _mbsnextc. _wcsnextc returns the integer value of the next wide character in string; _strnextc returns the integer value of the next single-byte character in string. _strnextc and _wcsnextc are provided only for this mapping and should not be used otherwise. _mbsnextc_l is identical except that it uses the locale parameter passed in instead. For more information, see Using Generic-Text Mappings and Generic-Text Mappings.
| Routine | Required header | Compatibility |
|---|---|---|
| _mbsnextc | <mbstring.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _mbsnextc_l | <mbstring.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _strnextc | <tchar.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _wcsnextc | <tchar.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
For more compatibility information, see Compatibility in the Introduction.
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.