Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F391046
modifier.strip.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
710 B
Subscribers
None
modifier.strip.php
View Options
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty strip modifier plugin
*
* Type: modifier<br>
* Name: strip<br>
* Purpose: Replace all repeated spaces, newlines, tabs
* with a single space or supplied replacement string.<br>
* Example: {$var|strip} {$var|strip:" "}
* Date: September 25th, 2002
*
* @link http://smarty.php.net/manual/en/language.modifier.strip.php strip (Smarty online manual)
* @author Monte Ohrt <monte at ohrt dot com>
* @version 1.0
* @param string $
* @param string $
* @return string
*/
function
smarty_modifier_strip
(
$text
,
$replace
=
' '
)
{
return
preg_replace
(
'!
\s
+!'
,
$replace
,
$text
);
}
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Feb 22, 20:21 (9 h, 40 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25454
Default Alt Text
modifier.strip.php (710 B)
Attached To
rZED Zed
Event Timeline
Log In to Comment