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
(defaults to"0"
) (optional)- Size in bytes
- -precision
(defaults to"1"
) (optional)- Numbers in the fractional part
- -standard
(defaults to"decimal"
) (optional)- 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