Name

String::FormatSize — Return a pretty description of a byte count

Synopsis

Import String;
string String::FormatSize ( integer  bytes );

Parameters

integer bytes

size (e.g. free diskspace) in Bytes

Return Value

string

formatted string

Description

Return a pretty description of a byte count, with two fraction digits and using KB, MB or GB as unit as appropriate.

Examples

  FormatSize(23456767890) -> "223.70 MB"