reference/strings/functions/chunk-split.xml
d335ba69a16f4013280de8e3e71d9ba19fe3cb3c
...
...
@@ -1,4 +1,4 @@
1
-
<?xml version="1.0" encoding="iso-8859-1"?>
1
+
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
3
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.chunk-split">
4
4
<refnamediv>
...
...
@@ -10,15 +10,15 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>string</type><methodname>chunk_split</methodname>
13
-
<methodparam><type>string</type><parameter>body</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter>chunklen</parameter></methodparam>
15
-
<methodparam choice="opt"><type>string</type><parameter>end</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>string</parameter></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>76</initializer></methodparam>
15
+
<methodparam choice="opt"><type>string</type><parameter>separator</parameter><initializer>"\r\n"</initializer></methodparam>
16
16
</methodsynopsis>
17
17
<para>
18
18
Can be used to split a string into smaller chunks which is useful for
19
19
e.g. converting <function>base64_encode</function> output to match RFC
20
-
2045 semantics. It inserts <parameter>end</parameter> every
21
-
<parameter>chunklen</parameter> characters.
20
+
2045 semantics. It inserts <parameter>separator</parameter> every
21
+
<parameter>length</parameter> characters.
22
22
</para>
23
23
</refsect1>
24
24

...
...
@@ -27,7 +27,7 @@
27
27
<para>
28
28
<variablelist>
29
29
<varlistentry>
30
-
<term><parameter>body</parameter></term>
30
+
<term><parameter>string</parameter></term>
31
31
<listitem>
32
32
<para>
33
33
The string to be chunked.
...
...
@@ -35,18 +35,18 @@
35
35
</listitem>
36
36
</varlistentry>
37
37
<varlistentry>
38
-
<term><parameter>chunklen</parameter></term>
38
+
<term><parameter>length</parameter></term>
39
39
<listitem>
40
40
<para>
41
-
The chunk length. Defaults to 76.
41
+
The chunk length.
42
42
</para>
43
43
</listitem>
44
44
</varlistentry>
45
45
<varlistentry>
46
-
<term><parameter>end</parameter></term>
46
+
<term><parameter>separator</parameter></term>
47
47
<listitem>
48
48
<para>
49
-
The line ending sequence. Defaults to "\r\n".
49
+
The line ending sequence.
50
50
</para>
51
51
</listitem>
52
52
</varlistentry>
...
...
@@ -84,7 +84,6 @@ $new_string = chunk_split(base64_encode($data));
84
84
<simplelist>
85
85
<member><function>str_split</function></member>
86
86
<member><function>explode</function></member>
87
-
<member><function>split</function></member>
88
87
<member><function>wordwrap</function></member>
89
88
<member><link xlink:href="&url.rfc;2045">RFC 2045</link></member>
90
89
</simplelist>
...
...
@@ -92,7 +91,6 @@ $new_string = chunk_split(base64_encode($data));
92
91
</refsect1>
93
92

94
93
</refentry>
95
-

96
94
<!-- Keep this comment at the end of the file
97
95
Local variables:
98
96
mode: sgml
99
97