Factor ellipsis size into Horde_String::truncate() output.
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 4 Mar 2010 04:11:30 +0000 (21:11 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 4 Mar 2010 07:40:00 +0000 (00:40 -0700)
framework/Util/lib/Horde/String.php

index 557621c..db02feb 100644 (file)
@@ -601,7 +601,7 @@ class Horde_String
     static public function truncate($text, $length = 100)
     {
         return (self::length($text) > $length)
-            ? self::substr($text, 0, $length) . ' ...'
+            ? self::substr($text, 0, $length - 3) . ' ...'
             : $text;
     }