Blame www/smarty/plugins/modifier.string_format.php
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
/**
|
|
Chris PeBenito |
696b41 |
* Smarty plugin
|
|
Chris PeBenito |
696b41 |
* @package Smarty
|
|
Chris PeBenito |
696b41 |
* @subpackage plugins
|
|
Chris PeBenito |
696b41 |
*/
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
/**
|
|
Chris PeBenito |
696b41 |
* Smarty string_format modifier plugin
|
|
Chris PeBenito |
696b41 |
*
|
|
Chris PeBenito |
696b41 |
* Type: modifier
|
|
Chris PeBenito |
696b41 |
* Name: string_format
|
|
Chris PeBenito |
696b41 |
* Purpose: format strings via sprintf
|
|
Chris PeBenito |
696b41 |
* @link http://smarty.php.net/manual/en/language.modifier.string.format.php
|
|
Chris PeBenito |
696b41 |
* string_format (Smarty online manual)
|
|
Chris PeBenito |
696b41 |
* @param string
|
|
Chris PeBenito |
696b41 |
* @param string
|
|
Chris PeBenito |
696b41 |
* @return string
|
|
Chris PeBenito |
696b41 |
*/
|
|
Chris PeBenito |
696b41 |
function smarty_modifier_string_format($string, $format)
|
|
Chris PeBenito |
696b41 |
{
|
|
Chris PeBenito |
696b41 |
return sprintf($format, $string);
|
|
Chris PeBenito |
696b41 |
}
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
/* vim: set expandtab: */
|
|
Chris PeBenito |
696b41 |
|
|
Chris PeBenito |
696b41 |
?>
|