Formats a number with automatic byte-unit extension and with specific min- and max-Fraction-Digits (localized).
Trailing "0"s after the fraction-separator are cut-off.
Syntax
format_byte($number, int $minFracDigits = 0, int $maxFracDigits = 2, bool $unitLong = false): string
- $number - int|float|string|null
The number to format. - ...
Examples
{{ hublify.format_byte( 4096 }} => 4 KB