lc_content_size_pretty (public)
lc_content_size_pretty [ -size size ] [ -precision precision ] \
[ -standard standard ]Defined in packages/acs-lang/tcl/localization-procs.tcl
Transforms data size, provided in nonnegative bytes, to KB, MB... up to YB.
- Switches:
- -size (optional, defaults to
"0")- Size in bytes
- -precision (optional, defaults to
"1")- Numbers in the fractional part
- -standard (optional, defaults to
"decimal")- Standard to use for binary prefix. Three standards are supported currently by this proc: - decimal (default): SI (base-10, 1000 bytes = 1kB) - binary: IEC (base-2, 1024 bytes = 1KiB) - legacy: JEDEC (base-2, 1024 bytes = 1KB)
- Returns:
- Size in given standard units (e.g. '5.2 MB')
- Author:
- Héctor Romojaro
- Created:
- 2019-06-25
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- lang_test__lc_content_size_pretty