reference/strings/functions/addcslashes.xml
2bcb7a986d47e06c1a37474a8b3634367c907043
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.addcslashes">
3
+
<refentry xml:id="function.addcslashes" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>addcslashes</refname>
6
6
<refpurpose>Quote string with slashes in a C style</refpurpose>
...
...
@@ -10,12 +10,12 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>string</type><methodname>addcslashes</methodname>
13
-
<methodparam><type>string</type><parameter>str</parameter></methodparam>
14
-
<methodparam><type>string</type><parameter>charlist</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>string</parameter></methodparam>
14
+
<methodparam><type>string</type><parameter>characters</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Returns a string with backslashes before characters that are
18
-
listed in <parameter>charlist</parameter> parameter.
18
+
listed in <parameter>characters</parameter> parameter.
19
19
</para>
20
20
</refsect1>
21
21

...
...
@@ -24,7 +24,7 @@
24
24
<para>
25
25
<variablelist>
26
26
<varlistentry>
27
-
<term><parameter>str</parameter></term>
27
+
<term><parameter>string</parameter></term>
28
28
<listitem>
29
29
<para>
30
30
The string to be escaped.
...
...
@@ -32,18 +32,18 @@
32
32
</listitem>
33
33
</varlistentry>
34
34
<varlistentry>
35
-
<term><parameter>charlist</parameter></term>
35
+
<term><parameter>characters</parameter></term>
36
36
<listitem>
37
37
<para>
38
38
A list of characters to be escaped. If
39
-
<parameter>charlist</parameter> contains characters
39
+
<parameter>characters</parameter> contains characters
40
40
<literal>\n</literal>, <literal>\r</literal> etc., they are
41
41
converted in C-like style, while other non-alphanumeric characters
42
42
with ASCII codes lower than 32 and higher than 126 converted to
43
43
octal representation.
44
44
</para>
45
45
<para>
46
-
When you define a sequence of characters in the charlist argument
46
+
When you define a sequence of characters in the <parameter>characters</parameter> argument
47
47
make sure that you know what characters come between the
48
48
characters that you set as the start and end of the range.
49
49
<informalexample>
...
...
@@ -81,7 +81,7 @@ echo addcslashes("zoo['.']", 'z..A');
81
81
also defined in other C-derived languages, including PHP, meaning that
82
82
you may not get the desired result if you use the output of
83
83
<function>addcslashes</function> to generate code in those languages
84
-
with these characters defined in <parameter>charlist</parameter>.
84
+
with these characters defined in <parameter>characters</parameter>.
85
85
</para>
86
86
</listitem>
87
87
</varlistentry>
...
...
@@ -96,34 +96,10 @@ echo addcslashes("zoo['.']", 'z..A');
96
96
</para>
97
97
</refsect1>
98
98

99
-
<refsect1 role="changelog">
100
-
&reftitle.changelog;
101
-
<para>
102
-
<informaltable>
103
-
<tgroup cols="2">
104
-
<thead>
105
-
<row>
106
-
<entry>&Version;</entry>
107
-
<entry>&Description;</entry>
108
-
</row>
109
-
</thead>
110
-
<tbody>
111
-
<row>
112
-
<entry>5.2.5</entry>
113
-
<entry>
114
-
The escape sequences \v and \f were added.
115
-
</entry>
116
-
</row>
117
-
</tbody>
118
-
</tgroup>
119
-
</informaltable>
120
-
</para>
121
-
</refsect1>
122
-
123
99
<refsect1 role="examples">
124
100
&reftitle.examples;
125
101
<para>
126
-
<parameter>charlist</parameter> like "\0..\37", which would
102
+
<parameter>characters</parameter> like "\0..\37", which would
127
103
escape all characters with ASCII code between 0 and 31.
128
104
<example>
129
105
<title><function>addcslashes</function> example</title>
...
...
@@ -152,7 +128,6 @@ $escaped = addcslashes($not_escaped, "\0..\37!@\177..\377");
152
128
</refsect1>
153
129

154
130
</refentry>
155
-

156
131
<!-- Keep this comment at the end of the file
157
132
Local variables:
158
133
mode: sgml
159
134