reference/mbstring/functions/mb-substr.xml
92f1b8b177eb5730382abf9f27bae868f1bb636f
...
...
@@ -10,17 +10,17 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>string</type><methodname>mb_substr</methodname>
13
-
<methodparam><type>string</type><parameter>str</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>string</parameter></methodparam>
14
14
<methodparam><type>int</type><parameter>start</parameter></methodparam>
15
-
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>NULL</initializer></methodparam>
16
-
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>mb_internal_encoding()</initializer></methodparam>
15
+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>length</parameter><initializer>&null;</initializer></methodparam>
16
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
Performs a multi-byte safe
20
20
<function>substr</function> operation based on
21
21
number of characters. Position is
22
22
counted from the beginning of
23
-
<parameter>str</parameter>. First character's position is
23
+
<parameter>string</parameter>. First character's position is
24
24
0. Second character position is 1, and so on.
25
25
</para>
26
26
</refsect1>
...
...
@@ -30,7 +30,7 @@
30
30
<para>
31
31
<variablelist>
32
32
<varlistentry>
33
-
<term><parameter>str</parameter></term>
33
+
<term><parameter>string</parameter></term>
34
34
<listitem>
35
35
<para>
36
36
The <type>string</type> to extract the substring from.
...
...
@@ -43,7 +43,7 @@
43
43
<para>
44
44
If <parameter>start</parameter> is non-negative, the returned string
45
45
will start at the <parameter>start</parameter>'th position in
46
-
<parameter>str</parameter>, counting from zero. For instance,
46
+
<parameter>string</parameter>, counting from zero. For instance,
47
47
in the string '<literal>abcdef</literal>', the character at
48
48
position <literal>0</literal> is '<literal>a</literal>', the
49
49
character at position <literal>2</literal> is
...
...
@@ -52,7 +52,7 @@
52
52
<para>
53
53
If <parameter>start</parameter> is negative, the returned string
54
54
will start at the <parameter>start</parameter>'th character
55
-
from the end of <parameter>str</parameter>.
55
+
from the end of <parameter>string</parameter>.
56
56
</para>
57
57
</listitem>
58
58
</varlistentry>
...
...
@@ -60,7 +60,7 @@
60
60
<term><parameter>length</parameter></term>
61
61
<listitem>
62
62
<para>
63
-
Maximum number of characters to use from <parameter>str</parameter>. If
63
+
Maximum number of characters to use from <parameter>string</parameter>. If
64
64
omitted or <literal>NULL</literal> is passed, extract all characters to
65
65
the end of the string.
66
66
</para>
...
...
@@ -80,7 +80,7 @@
80
80
&reftitle.returnvalues;
81
81
<para>
82
82
<function>mb_substr</function> returns the portion of
83
-
<parameter>str</parameter> specified by the
83
+
<parameter>string</parameter> specified by the
84
84
<parameter>start</parameter> and
85
85
<parameter>length</parameter> parameters.
86
86
</para>
...
...
@@ -88,28 +88,19 @@
88
88

89
89
<refsect1 role="changelog">
90
90
&reftitle.changelog;
91
-
<para>
92
-
<informaltable>
93
-
<tgroup cols="2">
94
-
<thead>
95
-
<row>
96
-
<entry>&Version;</entry>
97
-
<entry>&Description;</entry>
98
-
</row>
99
-
</thead>
100
-
<tbody>
101
-
<row>
102
-
<entry>5.4.8</entry>
103
-
<entry>
104
-
Passing <literal>NULL</literal> as <parameter>length</parameter>
105
-
extracts all characters to the end of the string. Prior to this version
106
-
<literal>NULL</literal> was treated the same as <literal>0</literal>.
107
-
</entry>
108
-
</row>
109
-
</tbody>
110
-
</tgroup>
111
-
</informaltable>
112
-
</para>
91
+
<informaltable>
92
+
<tgroup cols="2">
93
+
<thead>
94
+
<row>
95
+
<entry>&Version;</entry>
96
+
<entry>&Description;</entry>
97
+
</row>
98
+
</thead>
99
+
<tbody>
100
+
&mbstring.changelog.encoding-nullable;
101
+
</tbody>
102
+
</tgroup>
103
+
</informaltable>
113
104
</refsect1>
114
105

115
106
<refsect1 role="seealso">
...
...
@@ -123,7 +114,6 @@
123
114
</refsect1>
124
115

125
116
</refentry>
126
-

127
117
<!-- Keep this comment at the end of the file
128
118
Local variables:
129
119
mode: sgml
130
120