本文整理自网络,侵删。
//判断字符是否是汉字 function IsHZ(ch: WideChar): boolean; var i:integer; begin i:=or d(ch); if( i<19968) or (i>40869) then result:=false else result:=true; end;
ByteType字符串中判断是否英文
ByteType('123你好吗',1)=mbSingleByte//单字节ByteType('123你好吗',4)=mbLeadByte//双字节字符的第一个字符ByteType('123你好吗',5)=mbTrailByte//双字节字符的第二个字符 function IsMBCSChar(const ch: Char): Boolean;begin Result := (ByteType(ch, 1) <> mbSingleByte);end;是否中文(简体,繁体)
相关阅读 >>
Delphi [函数] unicode 检查字符串是否含中文字
Delphi getrandompassword 生成随机密码
Delphi vcl 模式下和firemonkey 模式下的字符串
Delphi 2009 泛型容器单元(generics.collections)[1]: tlist<t>
Delphi winapi: getfocus - 获取当前拥有焦点的窗口的句柄
更多相关阅读请进入《Delphi》频道 >>