removed mods directory from the ATutor codebase
[atutor.git] / mods / phpdoc2 / PhpDocumentor / phpDocumentor / Smarty-2.6.0 / libs / plugins / modifier.truncate.php
diff --git a/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/modifier.truncate.php b/mods/phpdoc2/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/modifier.truncate.php
deleted file mode 100644 (file)
index 775a20e..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php\r
-/**\r
- * Smarty plugin\r
- * @package Smarty\r
- * @subpackage plugins\r
- */\r
-\r
-\r
-/**\r
- * Smarty truncate modifier plugin\r
- *\r
- * Type:     modifier<br>\r
- * Name:     truncate<br>\r
- * Purpose:  Truncate a string to a certain length if necessary,\r
- *           optionally splitting in the middle of a word, and \r
- *           appending the $etc string.\r
- * @link http://smarty.php.net/manual/en/language.modifier.truncate.php\r
- *          truncate (Smarty online manual)\r
- * @param string\r
- * @param integer\r
- * @param string\r
- * @param boolean\r
- * @return string\r
- */\r
-function smarty_modifier_truncate($string, $length = 80, $etc = '...',\r
-                                  $break_words = false)\r
-{\r
-    if ($length == 0)\r
-        return '';\r
-\r
-    if (strlen($string) > $length) {\r
-        $length -= strlen($etc);       \r
-        if (!$break_words)\r
-           $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length+1));\r
-      \r
-        return substr($string, 0, $length).$etc;\r
-    } else\r
-        return $string;\r
-}\r
-\r
-/* vim: set expandtab: */\r
-\r
-?>\r