reference/iconv/functions/iconv-strlen.xml
ab9a7d2e3dfa9224186abcbd7a43b3af08d1bfdb
...
...
@@ -9,14 +9,14 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>int</type><methodname>iconv_strlen</methodname>
13
-
<methodparam><type>string</type><parameter>str</parameter></methodparam>
14
-
<methodparam choice="opt"><type>string</type><parameter>charset</parameter><initializer>ini_get("iconv.internal_encoding")</initializer></methodparam>
12
+
<type class="union"><type>int</type><type>false</type></type><methodname>iconv_strlen</methodname>
13
+
<methodparam><type>string</type><parameter>string</parameter></methodparam>
14
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
In contrast to <function>strlen</function>,
18
18
<function>iconv_strlen</function> counts the occurrences of characters
19
-
in the given byte sequence <parameter>str</parameter> on the basis of
19
+
in the given byte sequence <parameter>string</parameter> on the basis of
20
20
the specified character set, the result of which is not necessarily
21
21
identical to the length of the string in byte.
22
22
</para>
...
...
@@ -27,7 +27,7 @@
27
27
<para>
28
28
<variablelist>
29
29
<varlistentry>
30
-
<term><parameter>str</parameter></term>
30
+
<term><parameter>string</parameter></term>
31
31
<listitem>
32
32
<para>
33
33
The string.
...
...
@@ -35,11 +35,11 @@
35
35
</listitem>
36
36
</varlistentry>
37
37
<varlistentry>
38
-
<term><parameter>charset</parameter></term>
38
+
<term><parameter>encoding</parameter></term>
39
39
<listitem>
40
40
<para>
41
-
If <parameter>charset</parameter> parameter is omitted,
42
-
<parameter>str</parameter> is assumed to be encoded in
41
+
If <parameter>encoding</parameter> parameter is omitted or &null;,
42
+
<parameter>string</parameter> is assumed to be encoded in
43
43
<link linkend="iconv.configuration">iconv.internal_encoding</link>.
44
44
</para>
45
45
</listitem>
...
...
@@ -51,10 +51,33 @@
51
51
<refsect1 role="returnvalues">
52
52
&reftitle.returnvalues;
53
53
<para>
54
-
Returns the character count of <parameter>str</parameter>, as an integer.
54
+
Returns the character count of <parameter>string</parameter>, as an integer,
55
+
or &false; if an error occurs during the encoding.
55
56
</para>
56
57
</refsect1>
57
58

59
+
<refsect1 role="changelog">
60
+
&reftitle.changelog;
61
+
<informaltable>
62
+
<tgroup cols="2">
63
+
<thead>
64
+
<row>
65
+
<entry>&Version;</entry>
66
+
<entry>&Description;</entry>
67
+
</row>
68
+
</thead>
69
+
<tbody>
70
+
<row>
71
+
<entry>8.0.0</entry>
72
+
<entry>
73
+
<parameter>encoding</parameter> is nullable now.
74
+
</entry>
75
+
</row>
76
+
</tbody>
77
+
</tgroup>
78
+
</informaltable>
79
+
</refsect1>
80
+

58
81
<refsect1 role="seealso">
59
82
&reftitle.seealso;
60
83
<para>
...
...
@@ -67,7 +90,6 @@
67
90
</refsect1>
68
91

69
92
</refentry>
70
-

71
93
<!-- Keep this comment at the end of the file
72
94
Local variables:
73
95
mode: sgml
74
96