]> git.mxchange.org Git - friendica.git/blob - library/Smarty/libs/plugins/modifiercompiler.upper.php
f368e37dc3592332a7325d2e695158c34f90909b
[friendica.git] / library / Smarty / libs / plugins / modifiercompiler.upper.php
1 <?php\r
2 /**\r
3  * Smarty plugin\r
4  *\r
5  * @package Smarty\r
6  * @subpackage PluginsModifierCompiler\r
7  */\r
8 \r
9 /**\r
10  * Smarty upper modifier plugin\r
11  * \r
12  * Type:     modifier<br>\r
13  * Name:     lower<br>\r
14  * Purpose:  convert string to uppercase\r
15  * \r
16  * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual)\r
17  * @author Uwe Tews \r
18  * @param array $params parameters\r
19  * @return string with compiled code\r
20  */\r
21 function smarty_modifiercompiler_upper($params, $compiler)\r
22 {\r
23     if (Smarty::$_MBSTRING) {\r
24         return 'mb_strtoupper(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')' ;\r
25     }\r
26     // no MBString fallback\r
27     return 'strtoupper(' . $params[0] . ')';\r
28\r
29 \r
30 ?>