3eca134268c6773eccf4cbdfd709ff00f154cf7f
[reactos.git] / lib / crtdll / mbstring / mbslen.c
1 #include <crtdll/mbstring.h>
2
3 size_t _mbclen2(const unsigned int s);
4
5 size_t _mbslen(const unsigned char *str)
6 {
7         int i = 0;
8         unsigned char *s;
9
10         if (str == 0)
11                 return 0;
12                 
13         for (s = (unsigned char *)str; *s; s+=_mbclen2(*s),i++);
14         return i;
15 }