ReactOS 0.4.15-dev-7958-gcd0bb1a
_mbsnlen.c File Reference
#include <mbstring.h>
Include dependency graph for _mbsnlen.c:

Go to the source code of this file.

Functions

_Check_return_ _CRTIMP size_t __cdecl _mbsnlen (_In_z_ const unsigned char *pmbstr, _In_ size_t cjMaxLen)
 

Function Documentation

◆ _mbsnlen()

_Check_return_ _CRTIMP size_t __cdecl _mbsnlen ( _In_z_ const unsigned char pmbstr,
_In_ size_t  cjMaxLen 
)

Definition at line 15 of file _mbsnlen.c.

18{
19 size_t cchCount = 0;
20 unsigned char jMbsByte;
21
22 /* Loop while we have bytes to process */
23 while (cjMaxLen-- > 0)
24 {
25 /* Get next mb byte */
26 jMbsByte = *pmbstr++;
27
28 /* If this is 0, we're done */
29 if (jMbsByte == 0) break;
30
31 /* Don't count lead bytes */
32 if (!_ismbblead(jMbsByte)) cchCount++;
33 }
34
35 return cchCount;
36}
int __cdecl _ismbblead(unsigned int)
Definition: ismblead.c:20

Referenced by _Success_().