mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-27 18:32:09 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@196345 c90b9560-bf6c-de11-be94-00142212c4b1
71 lines
2.2 KiB
XML
71 lines
2.2 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.14 $ -->
|
|
<!-- EN-Revision: 1.8 Maintainer: didou Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
<refentry id="function.chunk-split">
|
|
<refnamediv>
|
|
<refname>chunk_split</refname>
|
|
<refpurpose>Scinde une chaîne</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>chunk_split</methodname>
|
|
<methodparam><type>string</type><parameter>body</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>chunklen</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>end</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>chunk_split</function> scinde la chaîne <parameter>body</parameter>
|
|
en segments de <parameter>chunklen</parameter> octets de longueur.
|
|
Cette fonction est très pratique pour convertir les résultats
|
|
de <function>base64_encode</function> au format
|
|
de la RFC 2045. Elle insère le paramètre <parameter>end</parameter>
|
|
(par défaut, "<literal>\r\n</literal>") tous les <parameter>chunklen</parameter>
|
|
caractères (par défaut, 76). Elle retourne la nouvelle chaîne, et
|
|
ne modifie pas la chaîne originale.
|
|
<example>
|
|
<title>Exemple avec <function>chunk_split</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// Formater des données pour suivre la norme RFC 2045
|
|
$new_string = chunk_split(base64_encode($data));
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<simpara>
|
|
Voir aussi
|
|
<function>explode</function>,
|
|
<function>split</function>,
|
|
<function>wordwrap</function> et
|
|
<ulink url="&url.rfc;2045">RFC 2045</ulink>.
|
|
</simpara>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|