summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers/string_helper.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-20 15:39:16 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-20 15:39:16 +0100
commitc082292f0678b71b8c3d323ea74f847ed4da100e (patch)
tree0fa0426f288e8f929ff50849e3c54f723ac52bcc /user_guide_src/source/helpers/string_helper.rst
parent56c879a870600b3e3ffce586c849d53e85f93674 (diff)
parent4d1167149a9bad94bdc6a6947525d4c610f0e3aa (diff)
Merge upstream branch
Diffstat (limited to 'user_guide_src/source/helpers/string_helper.rst')
-rw-r--r--user_guide_src/source/helpers/string_helper.rst30
1 files changed, 30 insertions, 0 deletions
diff --git a/user_guide_src/source/helpers/string_helper.rst b/user_guide_src/source/helpers/string_helper.rst
index dc70e461a..2d23fb00c 100644
--- a/user_guide_src/source/helpers/string_helper.rst
+++ b/user_guide_src/source/helpers/string_helper.rst
@@ -108,6 +108,36 @@ found in http://. Example
$string = "http://example.com//index.php";
echo reduce_double_slashes($string); // results in "http://example.com/index.php"
+strip_slashes()
+===============
+
+Removes any slashes from a string. Example
+
+::
+
+ $str = "Is your name O\'reilly?";
+ echo strip_slashes($str); // results in Is your name O'reilly?
+
+You can also use an array. Example
+
+::
+
+ $str = array(
+ 'question'  => 'Is your name O\'reilly?',
+ 'answer' => 'No, my name is O\'connor.'
+ );
+
+ $str = strip_slashes($str);
+
+The above will return the following array:
+
+::
+
+ array(
+ 'question'  => "Is your name O'reilly?",
+ 'answer' => "No, my name is O'connor."
+ );
+
trim_slashes()
==============