delphi Integer.tryParse


本文整理自网络,侵删。

 
会返回异常

Integer.Parse(string)

 

不会返回异常

Integer.tryParse('12',i);
 

结果:true 12

Integer.tryParse('12a',i);

结果:false 12

Integer.tryParse('a12',i);

结果:false 0

Integer.tryParse('1a2',i);

结果:false 1
――――――――――――――――

原文链接:https://blog.csdn.net/ozhy111/article/details/81942924

相关阅读 >>

Delphi trystrtoint字符转换成整数

Delphi 如何在stringgrid中嵌入控件,如按钮等等

Delphi 中文字符串函数问题rightstr

Delphi 获取系统桌面大小

Delphi窗口最小化和还原事件捕获

Delphi 用内存流文件流资源生成客户端

Delphi tradiogroup 单选分组框组件

Delphi中提取网页源代码

Delphi 校验手机号及身份证号

Delphi动态建立panel无法更改颜色?

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



打赏

取消

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

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

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

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

评论

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