ismbtrl.c
来自「一个类似windows」· C语言 代码 · 共 47 行
C
47 行
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/msvcrt/mbstring/ismbtrl.c
* PURPOSE: Checks for a trailing byte
* PROGRAMER: Boudewijn Dekker
* UPDATE HISTORY:
* 12/04/99: Created
*/
#include <mbstring.h>
#include <mbctype.h>
#include <internal/mbstring.h>
size_t _mbclen2(const unsigned int s);
// iskanji2() : (0x40 <= c <= 0x7E 0x80 <= c <= 0xFC)
/*
* @implemented
*/
int _ismbbtrail(unsigned int c)
{
return ((_mbctype+1)[(unsigned char)(c)] & _KNJ_2);
}
//int _ismbbtrail( unsigned int b)
//{
// return ((b >= 0x40 && b <= 0x7e ) || (b >= 0x80 && b <= 0xfc ) );
//}
/*
* @implemented
*/
int _ismbstrail( const unsigned char *str, const unsigned char *t)
{
unsigned char *s = (unsigned char *)str;
while(*s != 0 && s != t)
{
s+= _mbclen2(*s);
}
return _ismbbtrail(*s);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?