From 0851530669824b8d5375dc24d5579b9cc5d746ef Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Thu, 12 Jul 2007 12:49:54 +0000 Subject: added reduce_double_slashes() and trim_slashes() to docs --- user_guide/helpers/string_helper.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'user_guide') diff --git a/user_guide/helpers/string_helper.html b/user_guide/helpers/string_helper.html index 0858b78e9..df7e02ffa 100644 --- a/user_guide/helpers/string_helper.html +++ b/user_guide/helpers/string_helper.html @@ -121,10 +121,15 @@ Returns a fixed length 33 character string. echo repeater($string, 30);

The above would generate 30 newlines.

- - - - +

reduce_double_slashes()

+

onverts double slashes in a string to a single slash, except those found in http://. Example:

+$string = "http://www.some-site.com//index.php";
+echo reduce_double_slashes($string); // results in "http://www.some-site.com/index.php"
+

trim_slashes()

+

Removes any leading/traling slashes from a string. Example:
+
+ $string = "/this/that/theother/";
+echo trim_slashes($string); // results in this/that/theother

-- cgit v1.2.3-24-g4f1b