Padding Strings

From: Date: Sat, 13 Mar 2004 08:54:27 +0000
Subject: Padding Strings
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11111@lists.php.net to get a copy of this message
What is the easiest way to pad a string in smarty? Suppose I have a loop and the values come out such as 'some' and 'else', but I want to pad it left and right with '-' so that it becomes '--some--' and '--else--', is there a way to do this automatically or do I need to write my own custom modifier to do this? It seems like something that people might often want to do, have I missed it in the docs? Thanks Jake

« previous php.smarty.general (#11111) next »