Formatbytes: Misspelling and powers.

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Formatbytes: Misspelling and powers.

Post by SkyFrontier »

-Misspelling?:
v9.70.0007 - 2010-11-11 13:29
...
KB, MG, GB, TB, or PB = usual bytes unit.
-can you enhance it to deal with powers of 1000?
::echo formatbytes("1000", "kb"); //1 kB
versus
::echo formatbytes("1024", "kib"); //1 KiB
Thanks!
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Formatbytes: Misspelling and powers.

Post by admin »

SkyFrontier wrote:-Misspelling?:
v9.70.0007 - 2010-11-11 13:29
...
KB, MG, GB, TB, or PB = usual bytes unit.
-can you enhance it to deal with powers of 1000?
::echo formatbytes("1000", "kb"); //1 kB
versus
::echo formatbytes("1024", "kib"); //1 KiB
Thanks!
Yes, "MB", thanks.

kiB, nobody uses this. It's lifeless theory... or?

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: Formatbytes: Misspelling and powers.

Post by SkyFrontier »

admin wrote: kiB, nobody uses this. It's lifeless theory... or?
Hmmmm... theoretically agree. :wink:
Anyway, I'd prefer to see the standards ready to be shown to critics than not...
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Formatbytes: Misspelling and powers.

Post by admin »

SkyFrontier wrote:
admin wrote: kiB, nobody uses this. It's lifeless theory... or?
Hmmmm... theoretically agree. :wink:
Anyway, I'd prefer to see the standards ready to be shown to critics than not...
= highway to bloat. :)

Post Reply