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:
ejikharev
2009-02-04 08:19:12 +00:00
parent 08db172f23
commit 9effa59c03

View File

@ -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;
} }