Chris PeBenito 696b41
Chris PeBenito 696b41
/**
Chris PeBenito 696b41
 * Smarty plugin
Chris PeBenito 696b41
 * @package Smarty
Chris PeBenito 696b41
 * @subpackage plugins
Chris PeBenito 696b41
 */
Chris PeBenito 696b41
Chris PeBenito 696b41
Chris PeBenito 696b41
/**
Chris PeBenito 696b41
 * Smarty spacify modifier plugin
Chris PeBenito 696b41
 *
Chris PeBenito 696b41
 * Type:     modifier
Chris PeBenito 696b41
 * Name:     spacify
Chris PeBenito 696b41
 * Purpose:  add spaces between characters in a string
Chris PeBenito 696b41
 * @link http://smarty.php.net/manual/en/language.modifier.spacify.php
Chris PeBenito 696b41
 *          spacify (Smarty online manual)
Chris PeBenito 696b41
 * @param string
Chris PeBenito 696b41
 * @param string
Chris PeBenito 696b41
 * @return string
Chris PeBenito 696b41
 */
Chris PeBenito 696b41
function smarty_modifier_spacify($string, $spacify_char = ' ')
Chris PeBenito 696b41
{
Chris PeBenito 696b41
    return implode($spacify_char,
Chris PeBenito 696b41
                   preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY));
Chris PeBenito 696b41
}
Chris PeBenito 696b41
Chris PeBenito 696b41
/* vim: set expandtab: */
Chris PeBenito 696b41
Chris PeBenito 696b41
?>