Menu

SizeStr

Krzysztof Kamil Jacewicz

[ATUlib]: SizeStr

Converts number of bytes into a human readable file size string. It behaves similar to UNIX df command when passed -h switch (for human firendly). So for example, if the file size passed it 1024, the resulting string will be "1KB". All unit suffixes are: KB, MB, GB. Float number of units are rounded to 2 digits.

Function header

Function  SizeStr(const size: Int64): string;

Parameters

  • size - specifies file size in bytes

Result

Returns string with a human readable file size.


Related

Wiki: ATUlib

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.