Automatically exported from code.google.com/p/planningalerts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

30 line
579 B

  1. <?php
  2. /**
  3. * Smarty plugin
  4. * @package Smarty
  5. * @subpackage plugins
  6. */
  7. /**
  8. * Smarty string_format modifier plugin
  9. *
  10. * Type: modifier<br>
  11. * Name: string_format<br>
  12. * Purpose: format strings via sprintf
  13. * @link http://smarty.php.net/manual/en/language.modifier.string.format.php
  14. * string_format (Smarty online manual)
  15. * @author Monte Ohrt <monte at ohrt dot com>
  16. * @param string
  17. * @param string
  18. * @return string
  19. */
  20. function smarty_modifier_string_format($string, $format)
  21. {
  22. return sprintf($format, $string);
  23. }
  24. /* vim: set expandtab: */
  25. ?>