xref: /reactos/sdk/lib/crt/mbstring/mbsninc.c (revision ea6e7740)
1 /*
2  * COPYRIGHT:   See COPYING in the top level directory
3  * PROJECT:     ReactOS system libraries
4  * FILE:        lib/sdk/crt/mbstring/mbsninc.c
5  * PURPOSE:
6  * PROGRAMERS:
7   *              Copyright 1999 Alexandre Julliard
8  *              Copyright 2000 Jon Griffths
9  *
10  */
11 
12 #include <precomp.h>
13 
14 #include <mbstring.h>
15 
16 /*
17  * @implemented
18  */
19 unsigned char * _mbsninc(const unsigned char *str, size_t n)
20 {
21   if(!str)
22     return NULL;
23 
24   while (n > 0 && *str)
25   {
26     if (_ismbblead(*str))
27     {
28       if (!*(str+1))
29          break;
30       str++;
31     }
32     str++;
33     n--;
34   }
35 
36   return (unsigned char*)str;
37 }
38