现在的位置: 首页 > 综合 > 正文

Delphi判断全角字符方法

2012年09月19日 ⁄ 综合 ⁄ 共 265字 ⁄ 字号 评论关闭

Delphi中判断是否含有全角字符方法: 

 

//判断全角限制字符

if Length(pStr) > Length(WideString(pStr))   then   begin

    Result:='Full-width characters';

    exit;

end;

 

说明:

Length('汉字')=4

Length(WideString('汉字'))=2

  --本文来源于[TTT BLOG]:http://www.taoyoyo.net/ttt/post/190.html

(提示:转载时请务必保留版权信息或者注明来源。)

抱歉!评论已关闭.