public static function abbreviate($string, $maxWidth)
    {
        if (mb_strlen($string) > $maxWidth) {
            return mb_substr($string, 0, $maxWidth) . '...';
        }
        return $string;
    }
public static function abbreviate($string, $maxWidth)
    {
        if (mb_strlen($string) > $maxWidth) {
            return mb_substr($string, 0, $maxWidth) . '...';
        }
        return $string;
    }
public static function abbreviate ( $ string , $ maxWidth ) { if ( mb_strlen ( $ string ) > $ maxWidth ) { return mb_substr ( $ string , 0 , $ maxWidth ) . '...' ; } return $ string ; }
Abbreviate - abbreviates a string using ellipsis.

Example:
<code>
$result = Strings::abbreviate('ouzo is great', 5);
</code>
Result:
<code>
ouzo ...
</code>

@param string $string
@param string $maxWidth
@return string
Abbreviate - abbreviates a string using ellipsis .