PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/framework/vendor/smarty3/lib/libs/plugins/modifier.spacify.php

http://zoop.googlecode.com/
PHP | 27 lines | 6 code | 2 blank | 19 comment | 0 complexity | 2a314b5ae47d7fd68691fe728083981e MD5 | raw file
 1<?php
 2/**
 3* Smarty plugin
 4* 
 5* @package Smarty
 6* @subpackage PluginsModifier
 7*/
 8
 9/**
10* Smarty spacify modifier plugin
11* 
12* Type:     modifier<br>
13* Name:     spacify<br>
14* Purpose:  add spaces between characters in a string
15* 
16* @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual)
17* @author Monte Ohrt <monte at ohrt dot com> 
18* @param string $ 
19* @param string $ 
20* @return string 
21*/
22function smarty_modifier_spacify($string, $spacify_char = ' ')
23{
24    return implode($spacify_char, preg_split('//', $string, -1));
25} 
26
27?>