From 8863159339b73b7abd7d3f148dc0ad862994be07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Thu, 3 Jan 2019 16:04:52 -0500 Subject: first commit --- smarty/libs/plugins/modifiercompiler.lower.php | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 smarty/libs/plugins/modifiercompiler.lower.php (limited to 'smarty/libs/plugins/modifiercompiler.lower.php') diff --git a/smarty/libs/plugins/modifiercompiler.lower.php b/smarty/libs/plugins/modifiercompiler.lower.php new file mode 100644 index 0000000..a335eff --- /dev/null +++ b/smarty/libs/plugins/modifiercompiler.lower.php @@ -0,0 +1,31 @@ + + * Name: lower
+ * Purpose: convert string to lowercase + * + * @link http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty online manual) + * @author Monte Ohrt + * @author Uwe Tews + * + * @param array $params parameters + * + * @return string with compiled code + */ + +function smarty_modifiercompiler_lower($params) +{ + if (Smarty::$_MBSTRING) { + return 'mb_strtolower(' . $params[ 0 ] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')'; + } + // no MBString fallback + return 'strtolower(' . $params[ 0 ] . ')'; +} -- cgit v1.2.3