delphi中判断字符串是否为数字


本文整理自网络,侵删。

 
function IsNumber(pcString: PChar): Boolean;
begin
  Result := False;
  while pcString^ <> #0 do // 0 indicates the end of a PChar string
    if not (pcString^ in ['0'..'9']) then
      Exit;
    Inc(pcString);
  end;
  Result := True;
end;

相关阅读 >>

Delphi调节音量及静音

Delphi types of actual and formal var parameters must be identical

Delphi timer定时器 实现定时执行

Delphi 变体数组

Delphi 软件welcome窗口代码

Delphi serial number of an usb flash drive 获取u盘硬件序列号

Delphi 删除字符串中指定字符

Delphi sysutils.strcopy、sysutils.strecopy

Delphi winapi: movewindow - 改变窗口的位置与大小

Delphi 使用钩子函数 - 钩子链和 callnexthookex 的返回值

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



打赏

取消

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

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

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

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

评论

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