reference/strings/functions/rtrim.xml
eabde0419cf90f596f60db00e31fcb6ebe41ac55
...
...
@@ -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.rtrim">
3
+
<refentry xml:id="function.rtrim" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>rtrim</refname>
6
6
<refpurpose>Strip whitespace (or other characters) from the end of a string</refpurpose>
...
...
@@ -10,12 +10,12 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>string</type><methodname>rtrim</methodname>
13
-
<methodparam><type>string</type><parameter>str</parameter></methodparam>
14
-
<methodparam choice="opt"><type>string</type><parameter>charlist</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>string</parameter></methodparam>
14
+
<methodparam choice="opt"><type>string</type><parameter>characters</parameter><initializer>" \n\r\t\v\x00"</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
This function returns a string with whitespace stripped from the
18
-
end of <parameter>str</parameter>.
17
+
This function returns a string with whitespace (or other characters) stripped from the
18
+
end of <parameter>string</parameter>.
19
19
</para>
20
20
<para>
21
21
Without the second parameter,
...
...
@@ -49,12 +49,12 @@
49
49
<listitem>
50
50
<simpara>
51
51
"\0" (<acronym>ASCII</acronym> <literal>0</literal>
52
-
(<literal>0x00</literal>)), the <literal>NUL</literal>-byte.
52
+
(<literal>0x00</literal>)), the <literal>NULL</literal>-byte.
53
53
</simpara>
54
54
</listitem>
55
55
<listitem>
56
-
<simpara> <!-- not \v, since not supported by PHP -->
57
-
"\x0B" (<acronym>ASCII</acronym> <literal>11</literal>
56
+
<simpara>
57
+
"\v" (<acronym>ASCII</acronym> <literal>11</literal>
58
58
(<literal>0x0B</literal>)), a vertical tab.
59
59
</simpara>
60
60
</listitem>
...
...
@@ -67,7 +67,7 @@
67
67
<para>
68
68
<variablelist>
69
69
<varlistentry>
70
-
<term><parameter>str</parameter></term>
70
+
<term><parameter>string</parameter></term>
71
71
<listitem>
72
72
<para>
73
73
The input string.
...
...
@@ -75,11 +75,11 @@
75
75
</listitem>
76
76
</varlistentry>
77
77
<varlistentry>
78
-
<term><parameter>charlist</parameter></term>
78
+
<term><parameter>characters</parameter></term>
79
79
<listitem>
80
80
<para>
81
81
You can also specify the characters you want to strip, by means
82
-
of the <parameter>charlist</parameter> parameter.
82
+
of the <parameter>characters</parameter> parameter.
83
83
Simply list all characters that you want to be stripped. With
84
84
<literal>..</literal> you can specify a range of characters.
85
85
</para>
...
...
@@ -96,30 +96,6 @@
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>4.1.0</entry>
113
-
<entry>
114
-
The <parameter>charlist</parameter> parameter was 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>
...
...
@@ -182,7 +158,6 @@ string(15) " Example string"
182
158
</refsect1>
183
159

184
160
</refentry>
185
-

186
161
<!-- Keep this comment at the end of the file
187
162
Local variables:
188
163
mode: sgml
189
164