From 51609351f2c4b5082b7e6f0744cd3811c325303f Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 11 Oct 2016 14:01:29 +0200 Subject: * initial template --- lib/smarty/plugins/modifier.spacify.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lib/smarty/plugins/modifier.spacify.php (limited to 'lib/smarty/plugins/modifier.spacify.php') diff --git a/lib/smarty/plugins/modifier.spacify.php b/lib/smarty/plugins/modifier.spacify.php new file mode 100644 index 0000000..a907232 --- /dev/null +++ b/lib/smarty/plugins/modifier.spacify.php @@ -0,0 +1,27 @@ + + * Name: spacify
+ * Purpose: add spaces between characters in a string + * + * @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual) + * @author Monte Ohrt + * @param string $string input string + * @param string $spacify_char string to insert between characters. + * @return string + */ +function smarty_modifier_spacify($string, $spacify_char = ' ') +{ + // well… what about charsets besides latin and UTF-8? + return implode($spacify_char, preg_split('//' . Smarty::$_UTF8_MODIFIER, $string, -1, PREG_SPLIT_NO_EMPTY)); +} + +?> \ No newline at end of file -- cgit v1.2.3