_mbsninc, _mbsninc_l, _strninc, _wcsninc
Advances a string pointer by n characters.
unsigned char *_mbsninc( const unsigned char *str, size_t count ); unsigned char *_mbsninc( const unsigned char *str, size_t count, _locale_t locale ); char *_strninc( const char *str, size_t count ); wchar_t *_wcsninc( const wchar_t *str, size_t count );
Parameters
- str
-
Source string.
- count
-
Number of characters to increment a string pointer.
- locale
-
Locale to use.
The _mbsninc function increments str by count multibyte characters. _mbsninc recognizes multibyte-character sequences according to the multibyte code page currently in use.
| Tchar.h routine | _UNICODE and _MBCS not defined | _MBCS defined | _UNICODE defined |
|---|---|---|---|
| _tcsninc | _strninc | _mbsninc | _wcsninc |
_strninc and _wcsninc are single-byte–character string and wide-character string versions of _mbsninc. _wcsninc and _strninc are provided only for this mapping and should not be used otherwise. _mbsninc_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 |
|---|---|---|
| _mbsninc | <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 |
| _mbsninc_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 |
| _strninc | <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 |
| _wcsninc | <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.