📄 unicode.c
字号:
/*************************************************************
File Name: UNICODE.C *
**************************************************************
Programmer: MSC
Last Modified Date: 1999/08/22
Compiler : Gnu Cross-compiler
Platform : X86 protection mode
Usage :
Unicode-related routines
*************************************************************/
#include "../include/unicode.h"
/*************************************************************
Function: getUnicodeLen
Description:
get the unicode length of a string
Input:
src - the source string with a mix of single-byte and
double-byte chars
Output:
**************************************************************/
int getUnicodeLen(unsigned char *src)
{
int length = 0;
while (*src != '\0')
{
length++;
if (*src > 0x80)
src += 2;
else
src++;
}
return length;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -