From 9effa59c0325b926955f5ca1ce7c0d0e06ec7bf8 Mon Sep 17 00:00:00 2001 From: ejikharev Date: Wed, 4 Feb 2009 08:19:12 +0000 Subject: [PATCH] edit function truncate git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/trunk@57 4cb57b5f-5bbd-dd11-951b-001d605cbbc5 --- classes/Sublimer.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Sublimer.class.php b/classes/Sublimer.class.php index 7d5aba6..2e0723b 100644 --- a/classes/Sublimer.class.php +++ b/classes/Sublimer.class.php @@ -104,7 +104,7 @@ final class Sublimer */ 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; }