2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/crtdll/mbstring/ismbtrail.c
5 * PURPOSE: Checks for a trailing byte
6 * PROGRAMER: Boudewijn Dekker
11 #include <crtdll/mbstring.h>
12 #include <crtdll/mbctype.h>
14 size_t _mbclen2(const unsigned int s);
16 // iskanji2() : (0x40 <= c <= 0x7E 0x80 <= c <= 0xFC)
18 int _ismbbtrail(unsigned int c)
20 return ((_jctype+1)[(unsigned char)(c)] & _KNJ_2);
23 //int _ismbbtrail( unsigned int b)
25 // return ((b >= 0x40 && b <= 0x7e ) || (b >= 0x80 && b <= 0xfc ) );
29 int _ismbstrail( const unsigned char *str, const unsigned char *t)
31 unsigned char *s = (unsigned char *)str;
32 while(*s != 0 && s != t)
38 return _ismbbtrail(*s);