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