Files
doc-fr/reference/strings/functions/chunk-split.xml
Hannes Magnusson 069f6629d8 - Bunch of build fixes
- Upgrade to DocBook5:
  - All id attributes are now xml:id
  - Add docbook namespace to all root elements
  - Replace <ulink /> with <link xlink:href />
  - Minor markup fixes here and there


git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@238217 c90b9560-bf6c-de11-be94-00142212c4b1
2007-06-21 17:05:05 +00:00

71 lines
2.3 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.15 $ -->
<!-- EN-Revision: 1.8 Maintainer: didou Status: ready -->
<!-- Reviewed: yes -->
<refentry xml:id="function.chunk-split" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<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
<link xlink:href="&url.rfc;2045">RFC 2045</link>.
</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
-->