Re: [SMARTY-DEV] New plugin

From: Date: Tue, 27 May 2003 10:34:04 +0000
Subject: Re: [SMARTY-DEV] New plugin
References: 1 2 3 4  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1514@lists.php.net to get a copy of this message
On Tue, May 27, 2003 at 10:12:05AM +0100, Patrick Emond wrote: > I've attached a new modifier plugin that I thought some of you may find handy. It rounds > a number to two orders of significance and adds it's size prefix (similar to adding the -h > option to an linux ls command). It supports up to a Yotta (1e24) in size. > > For example: > > 13990 -> 14.0K > 4520000 -> 4.5M > 123 -> 123 > etc. Maybe it is better to divide by 1024, not by 1000. > The name isn't so good so if anyone can think of anything better to call it please > let me know. In one of my app I called it nice_size() (nice to eyes). -- Piotr Klaban

« previous php.smarty.dev (#1514) next »