0
0
mirror of https://github.com/salesagility/SuiteCRM.git synced 2024-11-21 23:47:57 +00:00
salesagility_SuiteCRM/include/Smarty/plugins/modifier.strip.php
Dillon-Brown acf296012d Revert "Merge branch 'hotfix' into develop"
This reverts commit d08f74643d, reversing
changes made to b137595f91.
2018-07-31 15:24:44 +01:00

34 lines
742 B
PHP
Executable File

<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* 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:"&nbsp;"}
* 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);
}
/* vim: set expandtab: */
?>