summaryrefslogtreecommitdiffstats
path: root/system/helpers/string_helper.php
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2007-05-02 13:39:23 +0200
committerDerek Allard <derek.allard@ellislab.com>2007-05-02 13:39:23 +0200
commit2c25fd0fb075090257e69440c94ef6fddd6f02f2 (patch)
treea594ba408620e20895c85ab4c10851c79ef7c7a7 /system/helpers/string_helper.php
parentbbc5ec2a660c960873f7c41437859fa1d82703d6 (diff)
return preg_replace("|^/*(.+?)/*$|", "\\1", $str);
to return trim($str, '/');
Diffstat (limited to 'system/helpers/string_helper.php')
-rw-r--r--system/helpers/string_helper.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php
index 04c3a592a..011be2333 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.php
@@ -44,8 +44,8 @@
*/
function trim_slashes($str)
{
- return preg_replace("|^/*(.+?)/*$|", "\\1", $str);
-}
+ return trim($str, '/');
+}
// ------------------------------------------------------------------------