XE Delphi 判断字符为中文的方法

在uses中添加System.AnsiStrings

/// Param ch--字符串
/// Param cno--字符位置

function IsZHChar(const ch: AnsiString; const cno: Integer): Boolean;
begin
  Result := (System.AnsiStrings.ByteType(ch, cno) <> mbSingleByte);
end;

猜你喜欢

转载自www.cnblogs.com/raswin/p/9268047.html