edit function truncate
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@57 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -104,7 +104,7 @@ final class Sublimer
|
|||||||
*/
|
*/
|
||||||
protected function trimString($text, $count = 15, $postfix = "...")
|
protected function trimString($text, $count = 15, $postfix = "...")
|
||||||
{
|
{
|
||||||
return mb_substr($text, 0, $count).$postfix;
|
return (mb_strlen($text) > $count) ? mb_substr($text, 0, $count).$postfix : $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user