CVS update: php3/doc/functions

From: Date: Sat, 19 Dec 1998 20:44:07 +0000
Subject: CVS update: php3/doc/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-2882@lists.php.net to get a copy of this message
Date: Saturday December 19, 1998 @ 15:44 Author: sas Update of /repository/php3/doc/functions In directory asf:/u/temp/cvs-serv19042/doc/functions Modified Files: strings.sgml Log Message: added chunk_split() especially useful for PR#967 Index: php3/doc/functions/strings.sgml diff -c php3/doc/functions/strings.sgml:1.47 php3/doc/functions/strings.sgml:1.48 *** php3/doc/functions/strings.sgml:1.47 Fri Dec 18 05:00:20 1998 --- php3/doc/functions/strings.sgml Sat Dec 19 15:44:07 1998 *************** *** 117,122 **** --- 117,156 ---- </refsect1> </refentry> + <refentry id="function.chunk-split"> + <refnamediv> + <refname>chunk_split</refname> + <refpurpose>Split a string into smaller chunks</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcdef>string <function>chunk_split</function></funcdef> + <paramdef>string <parameter>string</parameter></paramdef> + <paramdef>int <parameter><optional>chunklen</optional></parameter></paramdef> + <paramdef>string <parameter><optional>end</optional></parameter></paramdef> + </funcsynopsis> + <para> + Can be used to split a string into smaller chunks which is useful + for e.g. converting <link linkend="function.base64-encode">base64_encode</a> + output to match RFC 2045 behaviour. It inserts every + <parameter>chunklen</parameter> + (defaults to 76) chars the string <parameter>end</parameter> + (defaults to "\r\n"). + It returns the new string leaving the original string untouched. + <example> + <title>chr_replace() example</title> + <programlisting> + # format $data using RFC 2045 semantics + + $new_string = chunk_split(base64_encode($data)); + + </programlisting></example> + + This function is significantly faster than <function>ereg_replace</function>. + </refsect1> + </refentry> + <refentry id="function.convert-cyr-string"> <refnamediv> <refname>convert_cyr_string</refname> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#2882) next »