mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 20:53:02 +00:00
Create a branch for cmake bringup.
svn path=/branches/cmake-bringup/; revision=48236
This commit is contained in:
parent
a28e798006
commit
c424146e2c
20602 changed files with 0 additions and 1140137 deletions
35
lib/sdk/crt/mbstring/mbsnccnt.c
Normal file
35
lib/sdk/crt/mbstring/mbsnccnt.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <mbstring.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
size_t _mbsnccnt(const unsigned char *str, size_t n)
|
||||
{
|
||||
unsigned char *s = (unsigned char *)str;
|
||||
size_t cnt = 0;
|
||||
while(*s != 0 && n > 0) {
|
||||
if (_ismbblead(*s) )
|
||||
s++;
|
||||
else
|
||||
n--;
|
||||
s++;
|
||||
cnt++;
|
||||
}
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
size_t _mbsnbcnt(const unsigned char *str, size_t n)
|
||||
{
|
||||
unsigned char *s = (unsigned char *)str;
|
||||
while(*s != 0 && n > 0) {
|
||||
if (!_ismbblead(*s) )
|
||||
n--;
|
||||
s++;
|
||||
}
|
||||
|
||||
return (size_t)(s - str);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue