Garry's Mod Wiki

string.NiceSize

  string string.NiceSize( number bytes )

Description

Converts a digital filesize to human-readable text.

Arguments

1 number bytes
The filesize in bytes.

Returns

1 string
The human-readable filesize, in Bytes/KB/MB/GB (whichever is appropriate).

Example

Example output of this function.

Output: 63 KB