init
This commit is contained in:
24
include/Smarty/plugins/modifier.strip_semicolon.php
Executable file
24
include/Smarty/plugins/modifier.strip_semicolon.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Smarty plugin
|
||||
* @package Smarty
|
||||
* @subpackage plugins
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Smarty strip_semicolon modifier plugin
|
||||
*
|
||||
* Type: modifier<br>
|
||||
* Name: strip<br>
|
||||
* Purpose: Replace strings with trailing semicolon with blank string
|
||||
* @author Collin Lee
|
||||
* @version 1.0
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function smarty_modifier_strip_semicolon($text)
|
||||
{
|
||||
return preg_replace('/[:][\s]*$/', '', trim($text));
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user