📄 mbslwr.c
字号:
#include <mbstring.h>
#include <ctype.h>
unsigned int _mbbtolower(unsigned int c)
{
if (!_ismbblead(c) )
return tolower(c);
return c;
}
// code page 952
#define CASE_DIFF (0x8281 - 0x8260)
/*
* @implemented
*/
unsigned int _mbctolower(unsigned int c)
{
if ((c & 0xFF00) != 0) {
// true multibyte case conversion needed
if (_ismbclower(c))
return c + CASE_DIFF;
} else {
return _mbbtolower(c);
}
return 0;
}
/*
* @implemented
*/
unsigned char * _mbslwr(unsigned char *x)
{
unsigned char *y=x;
while (*y) {
if (!_ismbblead(*y)) {
*y = tolower(*y);
} else {
*y=_mbctolower(*(unsigned short *)y);
y++;
}
}
return x;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -