ReactOS 0.4.16-dev-2110-ge3521eb
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
const WCHAR * str
#define isleadbyte(_c)
Definition: wchar.h:598

◆ isleadbyte()

int isleadbyte ( int  byte)

Definition at line 294 of file ctype.c.

295{
296 return _isctype( c, _LEADBYTE );
297}
int CDECL _isctype(int c, int type)
Definition: ctype.c:198
#define _LEADBYTE
const GLubyte * c
Definition: glext.h:8905