Delphi判断全角字符方法
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
(提示:转载时请务必保留版权信息或者注明来源。)
- 上一篇 »javascript的字符串判断方法
- 下一篇 »PHP 中将全角字符转换成半角的方法