From 486a664fade996217aeed37a453ef719c030eaff Mon Sep 17 00:00:00 2001 From: Jakub Skopal Date: Mon, 6 Sep 1999 00:24:06 +0000 Subject: [PATCH] Added description of addcslashes() and stripcslashes(). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@12652 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/strings.sgml | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/functions/strings.sgml b/functions/strings.sgml index 7eb144fd05..c74a8193b7 100644 --- a/functions/strings.sgml +++ b/functions/strings.sgml @@ -9,6 +9,43 @@ handling sections. + + + AddCSlashes + quote string with slashes in a C style + + + Description + + string addcslashes + string str + string charlist + + + Returns a string with backslashes before characters that are listed + in charlist parameter. It escapes + \n, \r etc. in C-like style, + characters with ASCII code lower than 32 and higher than 126 are + converted to octal representation. Be carefull when escaping alphanumeric + characters. You can specify a range in charlist + like "\0..\37", which would escape all characters with ASCII code + between 0 and 31. + + addcslashes() example + +$escaped = addcslashes($not_escaped, "\0..\37!@\177..\377"); + + + + Added in PHP4b3-dev. + + + See also stripcslashes, stripslashes, htmlspecialchars + htmlspecialchars and quotemeta. + + + + AddSlashes @@ -1162,6 +1199,31 @@ $formatted = sprintf ("%01.2f", $money); + + + StripCSlashes + un-quote string quoted with addcslashes + + + Description + + string stripcslashes + string str + + + Returns a string with backslashes stripped off. Recognizes + C-like \n, \r ..., octal + and hexadecimal representation. + + + Added in PHP4b3-dev. + + + See also addcslashes. + + + + StripSlashes