/smarty_plugins/modifier.str_repeat.php

https://github.com/kastner/trackstat · PHP · 21 lines · 4 code · 3 blank · 14 comment · 0 complexity · b8f2a3efa818f25a131876658684da8d MD5 · raw file

  1. <?php
  2. /**
  3. * Smarty plugin
  4. * @package Smarty
  5. * @subpackage plugins
  6. */
  7. /**
  8. * Smarty count_characters modifier plugin
  9. *
  10. * Type: modifier<br>
  11. * Name: str_repeat<br>
  12. * Purpose: turns seconds to something like "about 10 minutes ago"
  13. * @param integer
  14. * @return string
  15. */
  16. function smarty_modifier_str_repeat($string, $times) {
  17. return str_repeat($string, $times);
  18. }