This documentation is archived and is not being maintained.

_mbsninc, _strninc, _wcsninc

Advance a string pointer by n characters.

unsigned char *_mbsninc(
   const unsigned char *string,
   size_t count 


Source string.
Number of characters to increment string pointer.

Return Value

Each of these routines returns a pointer to string after string has been incremented by count characters, or NULL if the supplied pointer is NULL. If count is greater than or equal to the number of characters in string, the result is undefined.


The _mbsninc function increments string by count multibyte characters. _mbsninc recognizes multibyte-character sequences according to the multibyte code page currently in use.

Generic-Text Routine Mappings

TCHAR.H Routine _UNICODE & _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. For more information, see Using Generic-Text Mappings and Generic-Text Mappings.


Routine Required header Compatibility
_mbsninc <mbstring.h> Win 98, Win Me, Win NT, Win 2000, Win XP
_strninc <tchar.h> Win 98, Win Me, Win NT, Win 2000, Win XP
_wcsninc <tchar.h> Win 98, Win Me, Win NT, Win 2000, Win XP

For additional compatibility information, see Compatibility in the Introduction.


All versions of the C run-time libraries.

See Also

String Manipulation Routines | _mbsdec | _mbsinc | _mbsnextc | Run-Time Routines and .NET Framework Equivalents