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):
%3 test_lang_test__lc_content_size_pretty lang_test__lc_content_size_pretty (test acs-lang) lc_content_size_pretty lc_content_size_pretty test_lang_test__lc_content_size_pretty->lc_content_size_pretty lc_get lc_get (public) lc_content_size_pretty->lc_get lc_numeric lc_numeric (public) lc_content_size_pretty->lc_numeric packages/acs-subsite/www/user/portrait/upload.tcl packages/acs-subsite/ www/user/portrait/upload.tcl packages/acs-subsite/www/user/portrait/upload.tcl->lc_content_size_pretty packages/attachments/www/attach.tcl packages/attachments/ www/attach.tcl packages/attachments/www/attach.tcl->lc_content_size_pretty packages/file-storage/lib/folder-links.tcl packages/file-storage/ lib/folder-links.tcl packages/file-storage/lib/folder-links.tcl->lc_content_size_pretty packages/file-storage/www/file.tcl packages/file-storage/ www/file.tcl packages/file-storage/www/file.tcl->lc_content_size_pretty packages/file-storage/www/folder-chunk.tcl packages/file-storage/ www/folder-chunk.tcl packages/file-storage/www/folder-chunk.tcl->lc_content_size_pretty

Testcases:
lang_test__lc_content_size_pretty
[ show source ]
Show another procedure: