9 if(!function_exists(
'smarty_mb_wordwrap')) {
 
   22     function smarty_mb_wordwrap($str, $width=75, $break=
"\n", $cut=
false)
 
   25         $tokens = preg_split(
'!(\s)!S' . 
Smarty::$_UTF8_MODIFIER, $str, -1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
 
   30         foreach ($tokens as $_token) {
 
   32             $_tokens = array($_token);
 
   33             if ($token_length > $width) {
 
   40                     $_tokens = preg_split(
'!(.{' . $width . 
'})!S' . 
Smarty::$_UTF8_MODIFIER, $_token, -1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
 
   46             foreach ($_tokens as $token) {
 
   49                 $length += $token_length;
 
   51                 if ($length > $width) {
 
   53                     if ($_previous && $token_length < $width) {
 
   59                     $length = $token_length;
 
   66                 } 
else if ($token == 
"\n") {
 
static $_UTF8_MODIFIER
Flag denoting if PCRE should run in UTF-8 mode. 
static $_CHARSET
The character set to adhere to (e.g.