本文整理自网络,侵删。
function SizeToStr(Size: int64): string; const K = int64(1024); M = K * K; G = K * M; T = K * G; begin if size < K then Result := Format('%d bytes', [size]) else if size < M then Result := Format('%f KB', [size / K]) else if size < G then Result := Format('%f MB', [size / M]) else if size < T then Result := Format('%f GB', [size / G]) else Result := Format('%f TB', [size / T]); end;
相关阅读 >>
Delphi 跨平台的,在fmx中读取icon文件的每一帧到bitmap
Delphi winapi: getmodulefilename、getmodulehandle
Delphi xe 网上获取北京时间android app 启动黑屏优化补丁
Delphi tokyo 版本 twebbrowser 的一个问题(bug?)
更多相关阅读请进入《Delphi》频道 >>