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