reference/strings/functions/trim.xml
eabde0419cf90f596f60db00e31fcb6ebe41ac55
...
...
@@ -1,7 +1,7 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
3
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
4
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.trim">
4
+
<refentry xml:id="function.trim" xmlns="http://docbook.org/ns/docbook">
5
5
<refnamediv>
6
6
<refname>trim</refname>
7
7
<refpurpose>Strip whitespace (or other characters) from the beginning and end of a string</refpurpose>
...
...
@@ -11,12 +11,12 @@
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
13
<type>string</type><methodname>trim</methodname>
14
-
<methodparam><type>string</type><parameter>str</parameter></methodparam>
15
-
<methodparam choice="opt"><type>string</type><parameter>character_mask</parameter><initializer>" \t\n\r\0\x0B"</initializer></methodparam>
14
+
<methodparam><type>string</type><parameter>string</parameter></methodparam>
15
+
<methodparam choice="opt"><type>string</type><parameter>characters</parameter><initializer>" \n\r\t\v\x00"</initializer></methodparam>
16
16
</methodsynopsis>
17
17
<para>
18
18
This function returns a string with whitespace stripped from the
19
-
beginning and end of <parameter>str</parameter>.
19
+
beginning and end of <parameter>string</parameter>.
20
20
Without the second parameter,
21
21
<function>trim</function> will strip these characters:
22
22
<!-- sorted by importance. Printed 3 times: trim, ltrim, rtrim -->
...
...
@@ -52,8 +52,8 @@
52
52
</simpara>
53
53
</listitem>
54
54
<listitem>
55
-
<simpara> <!-- not \v, since not supported by PHP -->
56
-
"\x0B" (<acronym>ASCII</acronym> <literal>11</literal>
55
+
<simpara>
56
+
"\v" (<acronym>ASCII</acronym> <literal>11</literal>
57
57
(<literal>0x0B</literal>)), a vertical tab.
58
58
</simpara>
59
59
</listitem>
...
...
@@ -66,7 +66,7 @@
66
66
<para>
67
67
<variablelist>
68
68
<varlistentry>
69
-
<term><parameter>str</parameter></term>
69
+
<term><parameter>string</parameter></term>
70
70
<listitem>
71
71
<para>
72
72
The <type>string</type> that will be trimmed.
...
...
@@ -74,11 +74,11 @@
74
74
</listitem>
75
75
</varlistentry>
76
76
<varlistentry>
77
-
<term><parameter>character_mask</parameter></term>
77
+
<term><parameter>characters</parameter></term>
78
78
<listitem>
79
79
<para>
80
80
Optionally, the stripped characters can also be specified using
81
-
the <parameter>character_mask</parameter> parameter.
81
+
the <parameter>characters</parameter> parameter.
82
82
Simply list all characters that you want to be stripped. With
83
83
<literal>..</literal> you can specify a range of characters.
84
84
</para>
...
...
@@ -219,7 +219,6 @@ array(3) {
219
219
</para>
220
220
</refsect1>
221
221
</refentry>
222
-

223
222
<!-- Keep this comment at the end of the file
224
223
Local variables:
225
224
mode: sgml
226
225