Extracted from Pike v7.6 release 61 at 2005-12-30.
pike.ida.liu.se
[Top]
String

Method String.int2size()


Method int2size

string String.int2size(int size)

Description

Returns the size as a memory size string with suffix, e.g. 43210 is converted into "42.2 kb". To be correct to the latest standards it should really read "42.2 KiB", but we have chosen to keep the old notation for a while. The function knows about the quantifiers kilo, mega, giga, tera, peta, exa, zetta and yotta.

Throws

Throws an error is size is less than zero.