* * @param string $string input string * @param integer $length length of truncated text * @param string $etc end string * @param boolean $break_words truncate at word boundary * @param boolean $middle truncate in the middle of text * * @return string truncated string */ function smarty_modifier_substr($string, $len){ return mb_substr($string, 0, $len); }