mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 17:24:01 +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/mbstrlen.c
Normal file
32
lib/sdk/crt/mbstring/mbstrlen.c
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
* FILE: lib/sdk/crt/mbstring/mbstrlen.c
|
||||
* PURPOSE: Determines the length of a multi byte string, current locale
|
||||
* PROGRAMERS:
|
||||
* Copyright 1999 Alexandre Julliard
|
||||
* Copyright 2000 Jon Griffths
|
||||
*
|
||||
*/
|
||||
|
||||
#include <mbstring.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int isleadbyte(int byte);
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
size_t _mbstrlen( const char *str )
|
||||
{
|
||||
size_t len = 0;
|
||||
while(*str)
|
||||
{
|
||||
/* FIXME: According to the documentation we are supposed to test for
|
||||
* multi-byte character validity. Whatever that means
|
||||
*/
|
||||
str += isleadbyte(*str) ? 2 : 1;
|
||||
len++;
|
||||
}
|
||||
return len;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue