reference/strings/functions/str-word-count.xml
d335ba69a16f4013280de8e3e71d9ba19fe3cb3c
...
...
@@ -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.str-word-count">
3
+
<refentry xml:id="function.str-word-count" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>str_word_count</refname>
6
6
<refpurpose>
...
...
@@ -10,10 +10,10 @@
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
-
<type>mixed</type><methodname>str_word_count</methodname>
13
+
<type class="union"><type>array</type><type>int</type></type><methodname>str_word_count</methodname>
14
14
<methodparam><type>string</type><parameter>string</parameter></methodparam>
15
15
<methodparam choice="opt"><type>int</type><parameter>format</parameter><initializer>0</initializer></methodparam>
16
-
<methodparam choice="opt"><type>string</type><parameter>charlist</parameter></methodparam>
16
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>characters</parameter><initializer>&null;</initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
Counts the number of words inside <parameter>string</parameter>.
...
...
@@ -28,6 +28,7 @@
28
28
For the purpose of this function, 'word' is defined as a locale dependent
29
29
string containing alphabetic characters, which also may contain, but not start
30
30
with &quot;'&quot; and &quot;-&quot; characters.
31
+
Note that multibyte locales are not supported.
31
32
</para>
32
33
</refsect1>
33
34

...
...
@@ -73,7 +74,7 @@
73
74
</listitem>
74
75
</varlistentry>
75
76
<varlistentry>
76
-
<term><parameter>charlist</parameter></term>
77
+
<term><parameter>characters</parameter></term>
77
78
<listitem>
78
79
<para>
79
80
A list of additional characters which will be considered as 'word'
...
...
@@ -92,6 +93,28 @@
92
93
</para>
93
94
</refsect1>
94
95

96
+
<refsect1 role="changelog">
97
+
&reftitle.changelog;
98
+
<informaltable>
99
+
<tgroup cols="2">
100
+
<thead>
101
+
<row>
102
+
<entry>&Version;</entry>
103
+
<entry>&Description;</entry>
104
+
</row>
105
+
</thead>
106
+
<tbody>
107
+
<row>
108
+
<entry>8.0.0</entry>
109
+
<entry>
110
+
<parameter>characters</parameter> is nullable now.
111
+
</entry>
112
+
</row>
113
+
</tbody>
114
+
</tgroup>
115
+
</informaltable>
116
+
</refsect1>
117
+

95
118
<refsect1 role="examples">
96
119
&reftitle.examples;
97
120
<para>
...
...
@@ -161,14 +184,12 @@ Array
161
184
<simplelist>
162
185
<member><function>explode</function></member>
163
186
<member><function>preg_split</function></member>
164
-
<member><function>split</function></member>
165
187
<member><function>count_chars</function></member>
166
188
<member><function>substr_count</function></member>
167
189
</simplelist>
168
190
</para>
169
191
</refsect1>
170
192
</refentry>
171
-

172
193
<!-- Keep this comment at the end of the file
173
194
Local variables:
174
195
mode: sgml
175
196