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'
...
...
@@ -94,26 +95,24 @@
94
95

95
96
<refsect1 role="changelog">
96
97
&reftitle.changelog;
97
-
<para>
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>5.1.0</entry>
109
-
<entry>
110
-
Added the <parameter>charlist</parameter> parameter
111
-
</entry>
112
-
</row>
113
-
</tbody>
114
-
</tgroup>
115
-
</informaltable>
116
-
</para>
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>
117
116
</refsect1>
118
117

119
118
<refsect1 role="examples">
...
...
@@ -185,14 +184,12 @@ Array
185
184
<simplelist>
186
185
<member><function>explode</function></member>
187
186
<member><function>preg_split</function></member>
188
-
<member><function>split</function></member>
189
187
<member><function>count_chars</function></member>
190
188
<member><function>substr_count</function></member>
191
189
</simplelist>
192
190
</para>
193
191
</refsect1>
194
192
</refentry>
195
-

196
193
<!-- Keep this comment at the end of the file
197
194
Local variables:
198
195
mode: sgml
199
196