10 * Smarty strip modifier plugin
14 * Purpose: Replace all repeated spaces, newlines, tabs
15 * with a single space or supplied replacement string.<br>
16 * Example: {$var|strip} {$var|strip:" "}
17 * Date: September 25th, 2002
18 * @link http://smarty.php.net/manual/en/language.modifier.strip.php
19 * strip (Smarty online manual)
20 * @author Monte Ohrt <monte at ohrt dot com>
26 function smarty_modifier_strip($text, $replace = ' ')
28 return preg_replace('!\s+!', $replace, $text);
31 /* vim: set expandtab: */