Re: [SMARTY-DEV] RE: [SMARTY] modifiers functions
| From: | George Miroshnikov | Date: | Sun, 13 Mar 2005 09:37:10 +0000 |
| Subject: | Re: [SMARTY-DEV] RE: [SMARTY] modifiers functions | ||
| References: | 1 2 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2660@lists.php.net to get a copy of this message | ||
Hello Nayra,
Sunday, March 13, 2005, 3:15:16 AM, you wrote:
NQ> It seems not to work so. If variable is less than 20 characters, truncate
NQ> don't modify it, but if it is more than 20, then truncate cut it and add "
NQ> ". I need a function that modifies my variable when its length is less than
NQ> 20 charaters and adds space characters to make its length 20 characters. :-)
You should probably create new custom modifier as a wrapper for PHP's
str_pad() function.
Cheers,
George Miroshnikov.