string.NiceSize

From Garry's Mod
Jump to: navigation, search
 string.NiceSize( )

Contents

Description

Converts a digital filesize to human-readable text.

Arguments

number bytes

The filesize in bytes.

Returns

string

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

Examples

Example

Example output of this function.

print(string.NiceSize(64512))

Output:

63 KB
Personal tools
Navigation