reference/strings/functions/ltrim.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.ltrim">
3
+
<refentry xml:id="function.ltrim" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>ltrim</refname>
6
6
<refpurpose>Strip whitespace (or other characters) from the beginning of a string</refpurpose>
...
...
@@ -10,8 +10,8 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>string</type><methodname>ltrim</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
17
Strip whitespace (or other characters) from the beginning of a string.
...
...
@@ -23,7 +23,7 @@
23
23
<para>
24
24
<variablelist>
25
25
<varlistentry>
26
-
<term><parameter>str</parameter></term>
26
+
<term><parameter>string</parameter></term>
27
27
<listitem>
28
28
<para>
29
29
The input string.
...
...
@@ -31,11 +31,11 @@
31
31
</listitem>
32
32
</varlistentry>
33
33
<varlistentry>
34
-
<term><parameter>charlist</parameter></term>
34
+
<term><parameter>characters</parameter></term>
35
35
<listitem>
36
36
<para>
37
37
You can also specify the characters you want to strip, by means of the
38
-
<parameter>charlist</parameter> parameter.
38
+
<parameter>characters</parameter> parameter.
39
39
Simply list all characters that you want to be stripped. With
40
40
<literal>..</literal> you can specify a range of characters.
41
41
</para>
...
...
@@ -49,7 +49,7 @@
49
49
&reftitle.returnvalues;
50
50
<para>
51
51
This function returns a string with whitespace stripped from the
52
-
beginning of <parameter>str</parameter>.
52
+
beginning of <parameter>string</parameter>.
53
53
Without the second parameter,
54
54
<function>ltrim</function> will strip these characters:
55
55
<!-- sorted by importance. Printed 3 times: trim, ltrim, rtrim -->
...
...
@@ -85,8 +85,8 @@
85
85
</simpara>
86
86
</listitem>
87
87
<listitem>
88
-
<simpara> <!-- not \v, since not supported by PHP -->
89
-
"\x0B" (<acronym>ASCII</acronym> <literal>11</literal>
88
+
<simpara>
89
+
"\v" (<acronym>ASCII</acronym> <literal>11</literal>
90
90
(<literal>0x0B</literal>)), a vertical tab.
91
91
</simpara>
92
92
</listitem>
...
...
@@ -94,30 +94,6 @@
94
94
</para>
95
95
</refsect1>
96
96

97
-
<refsect1 role="changelog">
98
-
&reftitle.changelog;
99
-
<para>
100
-
<informaltable>
101
-
<tgroup cols="2">
102
-
<thead>
103
-
<row>
104
-
<entry>&Version;</entry>
105
-
<entry>&Description;</entry>
106
-
</row>
107
-
</thead>
108
-
<tbody>
109
-
<row>
110
-
<entry>4.1.0</entry>
111
-
<entry>
112
-
The <parameter>charlist</parameter> parameter was added.
113
-
</entry>
114
-
</row>
115
-
</tbody>
116
-
</tgroup>
117
-
</informaltable>
118
-
</para>
119
-
</refsect1>
120
-

121
97
<refsect1 role="examples">
122
98
&reftitle.examples;
123
99
<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