Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmbsnccnt.c
Go to the documentation of this file.
00001 #include <mbstring.h> 00002 00003 /* 00004 * @implemented 00005 */ 00006 size_t _mbsnccnt(const unsigned char *str, size_t n) 00007 { 00008 unsigned char *s = (unsigned char *)str; 00009 size_t cnt = 0; 00010 while(*s != 0 && n > 0) { 00011 if (_ismbblead(*s) ) 00012 s++; 00013 else 00014 n--; 00015 s++; 00016 cnt++; 00017 } 00018 00019 return cnt; 00020 } 00021 00022 /* 00023 * @implemented 00024 */ 00025 size_t _mbsnbcnt(const unsigned char *str, size_t n) 00026 { 00027 unsigned char *s = (unsigned char *)str; 00028 while(*s != 0 && n > 0) { 00029 if (!_ismbblead(*s) ) 00030 n--; 00031 s++; 00032 } 00033 00034 return (size_t)(s - str); 00035 } Generated on Sun May 27 2012 04:36:29 for ReactOS by
1.7.6.1
|