本文整理自网络,侵删。
标准的Format函数可以做同样的事情!Format('%。10d',[15])将返回'0000000015'
或者:function AddLeadingZeros(const Source: string; Len: Integer): string;var i: Integer;begin Result := Source; for i := 1 to (Len-Length(Source)) do Result := '0' + Result;end;
相关阅读 >>
Delphixe4 版本中,已针对移动平台 引入了 arc 模型
Delphi 判断指定字符串是否开头 startstext用法
更多相关阅读请进入《Delphi》频道 >>