5 * @subpackage PluginsModifier
9 * Smarty replace modifier plugin
13 * Purpose: simple search/replace
15 * @link http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual)
16 * @author Monte Ohrt <monte at ohrt dot com>
18 * @param string $string input string
19 * @param string $search text to search for
20 * @param string $replace replacement text
23 function smarty_modifier_replace($string, $search, $replace)
25 if (Smarty::$_MBSTRING) {
26 require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
27 return smarty_mb_str_replace($search, $replace, $string);
30 return str_replace($search, $replace, $string);