PageRenderTime 50ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/includes/plugins/modifier.round.php

https://github.com/cmscout/CMScout-2.x
PHP | 26 lines | 6 code | 3 blank | 17 comment | 0 complexity | cb3c28891c793553df2f64f526ee44a9 MD5 | raw file
  1. <?php
  2. /**
  3. * Smarty plugin
  4. * @package Smarty
  5. * @subpackage plugins
  6. */
  7. /**
  8. * Smarty upper modifier plugin
  9. *
  10. * Type: modifier<br>
  11. * Name: round<br>
  12. * Purpose: convert string to uppercase
  13. * @link http://smarty.php.net/manual/en/language.modifier.upper.php
  14. * upper (Smarty online manual)
  15. * @author Monte Ohrt <monte at ohrt dot com>
  16. * @param string
  17. * @return string
  18. */
  19. function smarty_modifier_round($string, $places=2)
  20. {
  21. return round($string, $places);
  22. }
  23. ?>