27 function smarty_modifier_summary($text, $length=150, $suffix=
'…') {
28 $text = trim(preg_replace(
"/ +/",
" ", preg_replace(
"/[\r\n\t]/",
" ", html_entity_decode(strip_tags($text)))));
29 return StringUtil::cropString($text, $length, $suffix);
StringUtil provides support for string manipulation.