DELPHI检查字符串是否为纯数字


本文整理自网络,侵删。

 检查字符串是否为纯数字
function checkNumber(checkStr:String):Boolean; //检查字符串是否为纯数字
var
strLength:Integer;
iCircle:Integer;
strNumber: set of char;
begin
Result:=True;
strNumber:=[''0'',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'',''9''];
strLength:=length(checkStr);
for iCircle:=1 to strLength do
begin
if not (checkStr[iCircle] in strNumber) then
begin
Result:=False;
break;
end;
end;
end;

相关阅读 >>

Delphi-idhttp-json用法

Delphi判断字符串是否是汉字

Delphi 判断一目录是否共享

Delphi生成guid的两种方法

Delphi 调试ios时出现 please specify exact device preset uuid

Delphi 远程屏幕抓取的源代码

Delphi 新版内存表 fdmemtable

Delphi跨平台的字符串代码标准

Delphi 数据类型cardinal 怎么转换成 string?

Delphi 2009 之 tcategorypanelgroup[5]: headerstyle

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...