/[cvs]/nfo/php/libs/net.php.smarty/plugins/modifier.strip.php
ViewVC logotype

Annotation of /nfo/php/libs/net.php.smarty/plugins/modifier.strip.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Dec 19 16:40:20 2002 UTC (21 years, 8 months ago) by joko
Branch: MAIN
+ updated to version 2.3.1

1 joko 1.1 <?php
2    
3     /*
4     * Smarty plugin
5     * -------------------------------------------------------------
6     * Type: modifier
7     * Name: strip
8     * Purpose: Replace all repeated spaces, newlines, tabs
9     * with a single space or supplied replacement string.
10     * Example: {$var|strip} {$var|strip:"&nbsp;"}
11     * Author: Monte Ohrt <monte@ispi.net>
12     * Version: 1.0
13     * Date: September 25th, 2002
14     * -------------------------------------------------------------
15     */
16     function smarty_modifier_strip($text, $replace = ' ')
17     {
18     return preg_replace('!\s+!', $replace, $text);
19     }
20    
21     /* vim: set expandtab: */
22    
23     ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed