Function: trashed-format-size-string
trashed-format-size-string is a natively compiled function defined in
trashed.el.
Signature
(trashed-format-size-string SIZESTR)
Documentation
Format file string SIZESTR based on trashed-size-format.
Source Code
;; Defined in /nix/store/7ppdacjhnynz276lxxnfw8sdz6r2k6h2-emacs-packages-deps/share/emacs/site-lisp/elpa/trashed-20230811.157/trashed.el
;;; Internal functions
(defun trashed-format-size-string (sizestr)
"Format file string SIZESTR based on `trashed-size-format'."
(pcase trashed-size-format
('plain sizestr)
('human-readable (file-size-human-readable (string-to-number sizestr)))
('with-comma (let ((size (string-to-number sizestr)) ret)
(while (> size 0)
(setq ret (concat (format (if (< size 1000) "%d" "%03d")
(% size 1000))
(if ret "," "") ret)
size (/ size 1000)))
(or ret "0")))
(_ sizestr)))