More complicated but faster method

Also added a comment to explain the reason for such a complicated method
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index 76dc04a..b592f3c 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -89,7 +89,8 @@
 			return $str;
 		}
 
-		$str = preg_replace('/\s+/', ' ', $str);
+		// a bit complicated, but faster than preg_replace with \s+
+		$str = preg_replace('/ {2,}/', ' ', str_replace(array("\r", "\n", "\t", "\x0B", "\x0C"), ' ', $str));
 
 		if (strlen($str) <= $n)
 		{