6 * @subpackage PluginsModifierCompiler
10 * Smarty lower modifier plugin
13 * Purpose: convert string to lowercase
15 * @link http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty online manual)
16 * @author Monte Ohrt <monte at ohrt dot com>
19 * @param array $params parameters
21 * @return string with compiled code
24 function smarty_modifiercompiler_lower($params)
26 if (Smarty::$_MBSTRING) {
27 return 'mb_strtolower(' . $params[ 0 ] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
29 // no MBString fallback
30 return 'strtolower(' . $params[ 0 ] . ')';