delphi 字节数转换为KB或MB字符串


本文整理自网络,侵删。

 
function BytesToStr(iBytes: Integer): String;
var
iKb: Integer;
begin
iKb := Round(iBytes / 1024);
if iKb > 1000 then
Result := Format(‘%.2f MB‘, [iKb / 1024])
else
Result := Format(‘%d KB‘, [iKb]);
end;

相关阅读 >>

使用rad studio为安卓内置的java库

Delphi idhttp封装得post get函数

Delphi tstopwatch 计时

Delphi 减小程序的尺寸(关闭rtti反射机制)

Delphi xe8 用httpclient下载文件

Delphi andorid应用程序检查wifi有效还是无效

Delphi validatename 过滤特殊字符

Delphi 有关pchar.strcopy的实验

Delphi下的字符串分隔函数的一种用法

Delphi 获取listbox1多选的值

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



打赏

取消

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

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

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

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

评论

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