[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Converting an Integer into Human Readable String
From: |
Thierry Volpiatto |
Subject: |
Re: Converting an Integer into Human Readable String |
Date: |
Thu, 07 Apr 2011 21:01:31 +0200 |
User-agent: |
Gnus/5.110016 (No Gnus v0.16) Emacs/23.3.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: "Drew Adams" <drew.adams@oracle.com>
>> Date: Thu, 7 Apr 2011 11:13:07 -0700
>>
>> In any case, what I wrote was incorrect. AFAICT there is no way to pass the
>> number that is to be interpreted as the buffer size by "%I", except by
>> passing
>> an actual BUFFER of the given size as arg. This will do it, I guess, but it
>> seems a bit silly:
>
> Yes, but this isn't:
>
> (ls-lisp-format-file-size 4060 t) => " 4k"
>
> Of course, on Posix platforms you will need to (require 'ls-lisp)
> first, which is undesirable. Hmm...
>
> It would make sense to extract the workhorse of
> ls-lisp-format-file-size and make it a separate function in subr.el.
> Patches welcome.
anything have a function for this:
(anything-ff-human-size 4060)
==> "4.0K"
--
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
- Re: Converting an Integer into Human Readable String, (continued)
- Re: Converting an Integer into Human Readable String, Deniz Dogan, 2011/04/07
- Re: Converting an Integer into Human Readable String, Eli Zaretskii, 2011/04/07
- RE: Converting an Integer into Human Readable String, Drew Adams, 2011/04/07
- Re: Converting an Integer into Human Readable String, Eli Zaretskii, 2011/04/07
- Re: Converting an Integer into Human Readable String,
Thierry Volpiatto <=
- Message not available
- Message not available
- Re: Converting an Integer into Human Readable String, Thierry Volpiatto, 2011/04/08
- Re: Converting an Integer into Human Readable String, Eli Zaretskii, 2011/04/08
- Re: Converting an Integer into Human Readable String, Thierry Volpiatto, 2011/04/08
Re: Converting an Integer into Human Readable String, Pascal J. Bourguignon, 2011/04/08
Re: Converting an Integer into Human Readable String, Eli Zaretskii, 2011/04/09
Message not available