mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-23 22:52:12 +01:00
96 lines
3.0 KiB
XML
96 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 122d5d09692db103ef8e7b2e2fc31583ff3807e2 Maintainer: leonardolara Status: ready -->
|
|
<refentry xml:id="function.grapheme-str-split" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>grapheme_str_split</refname>
|
|
<refpurpose>Separa uma string em um array</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type class="union"><type>array</type><type>false</type></type><methodname>grapheme_str_split</methodname>
|
|
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>length</parameter><initializer>1</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<simpara>
|
|
Esta função retorna um array de strings.
|
|
É uma versão de <function>str_split</function>
|
|
com suporte para caracteres de byte de grupos de grafema.
|
|
Se o parâmetro <parameter>length</parameter> for especificado,
|
|
a string é quebrada em pedaços desse comprimento
|
|
em unidades de grupos de grafema (não em bytes).
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>string</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
A <type>string</type> a ser separada em grupos de grafemas ou pedaços.
|
|
<parameter>string</parameter> precisa ser em UTF-8 válido.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>length</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Cada elemento do array retornado será composto pelo número de grupos de grafema especificado no parâmetro <parameter>length</parameter>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<simpara>
|
|
<function>grapheme_str_split</function> retorna um array de strings, &return.falseforfailure;.
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<simpara>
|
|
Se <parameter>length</parameter> for menor que <literal>1</literal>,
|
|
um <classname>ValueError</classname> será lançado.
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member><function>str_split</function></member>
|
|
<member><function>mb_str_split</function></member>
|
|
<member>
|
|
<link xlink:href="&uri.unicode.graphemes;">
|
|
Segmentação de texto Unicode: limites do grupo de grafema
|
|
</link>
|
|
</member>
|
|
</simplelist>
|
|
</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
|
|
-->
|