ReactOS 0.4.16-dev-300-g2aadf2e
mbstrlen.c File Reference
#include <mbstring.h>
#include <stdlib.h>
Include dependency graph for mbstrlen.c:

Go to the source code of this file.

Functions

int isleadbyte (int byte)
 
size_t __cdecl _mbstrlen (const char *str)
 

Function Documentation

◆ _mbstrlen()

size_t __cdecl _mbstrlen ( const char str)

Definition at line 25 of file mbstrlen.c.

26{
27 size_t len = 0;
28 while(*str)
29 {
30 /* FIXME: According to the documentation we are supposed to test for
31 * multi-byte character validity. Whatever that means
32 */
33 str += isleadbyte((unsigned char)*str) ? 2 : 1;
34 len++;
35 }
36 return len;
37}
GLenum GLsizei len
Definition: glext.h:6722
#define isleadbyte(_c)
Definition: wchar.h:598
const WCHAR * str

◆ isleadbyte()

int isleadbyte ( int  byte)

Definition at line 7 of file islead.c.

8{
9 return _isctype( c, _LEADBYTE );
10
11}
const GLubyte * c
Definition: glext.h:8905
_Check_return_ _CRTIMP int __cdecl _isctype(_In_ int _C, _In_ int _Type)
#define _LEADBYTE
Definition: ctype.h:75