"Prefix" "Description" "Multiplier" k kilo 1024 M mega 1048576 G giga 1073741824 T tera 1099511627776 P peta 1125899906842624 E exa 1152921504606846976
The len argument must be at least 4 plus the length of suffix, in order to ensure a useful result is generated into buffer. To use a specific prefix, specify this as scale (multiplier = 1024 ^ scale). This cannot be combined with any of the scale flags below.
The following flags may be passed in scale:
Format the buffer using the lowest multiplier possible.
Return the prefix index number (the number of times number must be divided to fit) instead of formatting it to the buffer.
The following flags may be passed in flags:
If the final result is less than 10, display it using one digit.
Do not put a space between number and the prefix.
Use B (bytes) as prefix if the original result does not have a prefix.