mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 16:32:13 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@328083 c90b9560-bf6c-de11-be94-00142212c4b1
118 lines
3.3 KiB
XML
118 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 96c9d88bad9a7d7d44bfb7f26c226df7ee9ddf26 Maintainer: benjamin Status: ready -->
|
|
<!-- Reviewed: yes Maintainer: seros -->
|
|
<refentry xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://docbook.org/ns/docbook" xml:id="function.chunk-split">
|
|
<refnamediv>
|
|
<refname>chunk_split</refname>
|
|
<refpurpose>Divide una cadena en trozos más pequeños</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&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><initializer>76</initializer></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>end</parameter><initializer>"\r\n"</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Puede ser utilizado para dividir una cadena en trozos más pequeños, lo que es útil, por ejemplo,
|
|
para convertir la salida de la función <function>base64_encode</function> y hacer que coincida
|
|
con la semántica del RFC 2045. Inserta la cadena <parameter>end</parameter> cada
|
|
<parameter>chunklen</parameter> caracteres.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>body</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La cadena que será fragmentada.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>chunklen</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La longitud del trozo.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>end</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La secuencia de final de línea.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve la cadena fragmentada.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>chunk_split</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
// formatea $datos usando la semántica del RFC 2045
|
|
$nueva_cadena = chunk_split(base64_encode($datos));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>str_split</function></member>
|
|
<member><function>explode</function></member>
|
|
<member><function>split</function></member>
|
|
<member><function>wordwrap</function></member>
|
|
<member><link xlink:href="&url.rfc;2045">RFC 2045</link></member>
|
|
</simplelist>
|
|
</para>
|
|
</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:"~/.phpdoc/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
|
|
-->
|