JHtmlNumber

HTML helper class for rendering numbers.

abstract
package

Joomla.Platform

subpackage

HTML

since

11.1

Methods

bytes

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

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

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

since

11.1

Arguments

$bytes

integerThe number of bytes.

$unit

stringThe type of unit to return.

$precision

integerThe number of digits to be used after the decimal place.

Response

stringThe number of bytes in the proper units.