6 * @subpackage PluginsModifierCompiler
10 * Smarty strip modifier plugin
13 * Purpose: Replace all repeated spaces, newlines, tabs
14 * with a single space or supplied replacement string.<br>
15 * Example: {$var|strip} {$var|strip:" "}<br>
16 * Date: September 25th, 2002
18 * @link http://www.smarty.net/manual/en/language.modifier.strip.php strip (Smarty online manual)
21 * @param array $params parameters
23 * @return string with compiled code
26 function smarty_modifiercompiler_strip($params)
28 if (!isset($params[1])) {
32 return "preg_replace('!\s+!" . Smarty::$_UTF8_MODIFIER . "', {$params[1]},{$params[0]})";