Breadcrumb.php
protected function truncate($string, $length = 30, $separator = '...')
    {
        if (mb_strlen($string) > $length) {

            return rtrim(mb_substr($string, 0, $length)) . $separator;
        }

        return $string;
    }
protected function truncate($string, $length = 30, $separator = '...')
    {
        if (mb_strlen($string) > $length) {

            return rtrim(mb_substr($string, 0, $length)) . $separator;
        }

        return $string;
    }
protected function truncate ( $ string , $ length = 30 , $ separator = '...' ) { if ( mb_strlen ( $ string ) > $ length ) { return rtrim ( mb_substr ( $ string , 0 , $ length ) ) . $ separator ; } return $ string ; }
Truncate string.

@param string $string
@param int $length
@param string $separator

@return string
Truncate string .