ReactOS  0.4.13-dev-66-gc714b7f
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 }
int isleadbyte(int byte)
Definition: islead.c:7
const WCHAR * str
GLenum GLsizei len
Definition: glext.h:6722

◆ isleadbyte()

int isleadbyte ( int  byte)

Definition at line 7 of file islead.c.

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

Referenced by _mbstrlen().