mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 04:43:51 +00:00
Create a branch for header work.
svn path=/branches/header-work/; revision=45691
This commit is contained in:
parent
14fe274b1c
commit
9ea495ba33
19538 changed files with 0 additions and 1063950 deletions
32
lib/sdk/crt/mbstring/mbslen.c
Normal file
32
lib/sdk/crt/mbstring/mbslen.c
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
* FILE: lib/sdk/crt/mbstring/mbslen.c
|
||||
* PURPOSE: Determines the length of a multi byte string
|
||||
* PROGRAMERS:
|
||||
* Copyright 1999 Alexandre Julliard
|
||||
* Copyright 2000 Jon Griffths
|
||||
*
|
||||
*/
|
||||
|
||||
#include <mbstring.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
size_t _mbslen(const unsigned char *str)
|
||||
{
|
||||
size_t len = 0;
|
||||
while(*str)
|
||||
{
|
||||
if (_ismbblead(*str))
|
||||
{
|
||||
str++;
|
||||
if (!*str) /* count only full chars */
|
||||
break;
|
||||
}
|
||||
str++;
|
||||
len++;
|
||||
}
|
||||
return len;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue