本文整理自网络,侵删。
//delphi判断字符串是否是汉字
function IsHz(Source: string): Bool;
begin
result := ((Word(Source[1]) shl 8 + Word(Source[2])) >= $B0A1) and ((Word(Source[1]) shl 8 + Word(Source[2])) <= $D7F9)
end;
相关阅读 >>
如何在Delphi中禁用关于“返回值...可能未定义”的警告?
Delphi firedac 如何按整型(byte)读取 mysql tinyint(1) 类型字段?
更多相关阅读请进入《Delphi》频道 >>