Skip to content

Commit

Permalink
[PHP 8.4] Add mb_* functions
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardolara committed Oct 25, 2024
1 parent 514fc89 commit a8d425e
Show file tree
Hide file tree
Showing 5 changed files with 436 additions and 0 deletions.
81 changes: 81 additions & 0 deletions reference/mbstring/functions/mb-lcfirst.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 27ae0a4a16cdfc868a884c0f0dad7023b5f2709c Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<refentry xml:id="function.mb-lcfirst" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mb_lcfirst</refname>
<refpurpose>Converte parap minúscula o primeiro caractere de uma string</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>mb_lcfirst</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<simpara>
Realizad uma operação <function>lcfirst</function> segura para caracteres multi-byte,
e retorna uma string com o primeiro caractere de
<parameter>string</parameter> convertido para minúscula se esse caractere for
um ASCII no intervalo de <literal>"A"</literal> (0x41) até
<literal>"Z"</literal> (0x5a).
</simpara>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>string</parameter></term>
<listitem>
<simpara>
A string de entrada.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>encoding</parameter></term>
<listitem>
<simpara>
A codificação da string.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
Retorna a string resultante.
</simpara>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>mb_ucfirst</function></member>
<member><function>lcfirst</function></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
-->
92 changes: 92 additions & 0 deletions reference/mbstring/functions/mb-ltrim.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 27ae0a4a16cdfc868a884c0f0dad7023b5f2709c Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<refentry xml:id="function.mb-ltrim" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mb_ltrim</refname>
<refpurpose>Remove espaços em branco (ou outros caracteres) do início de uma string</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>mb_ltrim</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>characters</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<simpara>
Realiza uma operação <function>ltrim</function> segura para strings multi-byte.
Remove espaços em branco (ou outros caracteres) do início de uma string.
</simpara>
<simpara>
Sem o segundo parâmetro,
<function>mb_ltrim</function> removerá estes caracteres:
</simpara>
&strings.stripped.characters;
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>string</parameter></term>
<listitem>
<simpara>
A string de entrada.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>characters</parameter></term>
<listitem>
&strings.parameter.characters.optional;
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>encoding</parameter></term>
<listitem>
<simpara>
A codificação da string.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
Esta função retorna uma string com espaços em branco removidos do
início da <parameter>string</parameter>.
</simpara>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>mb_trim</function></member>
<member><function>mb_rtrim</function></member>
<member><function>ltrim</function></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
-->
92 changes: 92 additions & 0 deletions reference/mbstring/functions/mb-rtrim.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 27ae0a4a16cdfc868a884c0f0dad7023b5f2709c Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<refentry xml:id="function.mb-rtrim" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mb_rtrim</refname>
<refpurpose>Remove espaços em branco (ou outros caracteres) do final de uma string</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>mb_rtrim</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>characters</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<simpara>
Realiza uma operação <function>rtrim</function> regura para strings multi-byte,
e retorna uma string com espaços em branco (ou outros caracteres) removidos do
final da <parameter>string</parameter>.
</simpara>
<simpara>
Sem o segundo parâmetro,
<function>rtrim</function> removerá estes caracteres:
</simpara>
&strings.stripped.characters;
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>string</parameter></term>
<listitem>
<simpara>
A string de entrada.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>characters</parameter></term>
<listitem>
&strings.parameter.characters.optional;
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>encoding</parameter></term>
<listitem>
<simpara>
A codificação da string.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
Retorna a string modificada.
</simpara>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>mb_trim</function></member>
<member><function>mb_ltrim</function></member>
<member><function>rtrim</function></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
-->
89 changes: 89 additions & 0 deletions reference/mbstring/functions/mb-trim.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: 27ae0a4a16cdfc868a884c0f0dad7023b5f2709c Maintainer: leonardolara Status: ready --><!-- CREDITS: leonardolara -->
<refentry xml:id="function.mb-trim" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mb_trim</refname>
<refpurpose>Remove espaços em branco (ou outros caracteres) do início e do final de uma string</refpurpose>
</refnamediv>

<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>mb_trim</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>characters</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<simpara>
Realiza uma operação <function>trim</function> segura para strings multi-byte,
e retorna uma string com os espaços em branco (ou outros caracteres) removidos do
início e do final da <parameter>string</parameter>.
Sem o segundo parâmetro,
<function>trim</function> removerá estes caracteres:
</simpara>
&strings.stripped.characters;
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>string</parameter></term>
<listitem>
<simpara>
A <type>string</type> de entrada.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>characters</parameter></term>
<listitem>
&strings.parameter.characters.optional;
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>encoding</parameter></term>
<listitem>
<simpara>
A codificação da string.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
Retorna a string resultante.
</simpara>
</refsect1>

<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><function>mb_ltrim</function></member>
<member><function>mb_rtrim</function></member>
<member><function>trim</function></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
-->
Loading

0 comments on commit a8d425e

Please sign in to comment.