class JHtmlNumber


Located at : UKNOWVA_ROOT/libraries/joomla/html/html/number.php

HTML helper class for rendering numbers.

Methods

static string
bytes(integer $bytes, string $unit = 'auto', integer $precision = 2)

Converts bytes to more distinguishable formats such as: kilobytes, megabytes, etc.

Details

at line 36
static string bytes(integer $bytes, string $unit = 'auto', integer $precision = 2)

Converts bytes to more distinguishable formats such as: kilobytes, megabytes, etc.

By default, the proper format will automatically be chosen. However, one of the allowed unit types may also be used instead.

Parameters

integer $bytes The number of bytes.
string $unit The type of unit to return.
integer $precision The number of digits to be used after the decimal place.

Return Value

string The number of bytes in the proper units.