Sources for file plugins/smarty/modifier.indent.php in version 2.0



Click on a comment to hide it. Click here to show all comments.

/*
 * Smarty plugin
 * -------------------------------------------------------------
 * Type:     modifier
 * Name:     indent
 * Purpose:  indent lines of text
 * -------------------------------------------------------------
 */
function smarty_modifier_indent($string,$chars=4,$char=" ")
{
    return 
preg_replace('!^!m',str_repeat($char,$chars),$string);
}

?>


Website is Copyright © Odynia.org 2000-2005 - Xnyo is released under a BSD license.