function stringLimit($string, $length = 50, $ellipsis = '...') {
return strlen($fragment = substr($string, 0, $length + 1 - strlen($ellipsis))) < strlen($string) + 1 ?
preg_replace('/\s*\S*$/', '', $fragment) . $ellipsis : $string;
}
ja mekleetu manuaalii tad atrastu. shii ir no manuaalja.