forked from php/doc-en
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PHP 8.4] Add mb_* functions (php#3922)
Co-authored-by: Gina Peter Banyard <girgias@php.net> Co-authored-by: tekimen <youkidearitai@gmail.com>
- Loading branch information
1 parent
0185cc3
commit 27ae0a4
Showing
10 changed files
with
565 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<refentry xml:id="function.mb-lcfirst" xmlns="http://docbook.org/ns/docbook"> | ||
<refnamediv> | ||
<refname>mb_lcfirst</refname> | ||
<refpurpose>Make a string's first character lowercase</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> | ||
Performs a multi-byte safe <function>lcfirst</function> operation, | ||
and returns a string with the first character of | ||
<parameter>string</parameter> lowercased if that character is | ||
an ASCII character in the range <literal>"A"</literal> (0x41) to | ||
<literal>"Z"</literal> (0x5a). | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>string</parameter></term> | ||
<listitem> | ||
<simpara> | ||
The input string. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>encoding</parameter></term> | ||
<listitem> | ||
<simpara> | ||
The string encoding. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<simpara> | ||
Returns the resulting string. | ||
</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 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<refentry xml:id="function.mb-ltrim" xmlns="http://docbook.org/ns/docbook"> | ||
<refnamediv> | ||
<refname>mb_ltrim</refname> | ||
<refpurpose>Strip whitespace (or other characters) from the beginning of a 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> | ||
Performs a multi-byte safe <function>ltrim</function> operation. | ||
Strip whitespace (or other characters) from the beginning of a string. | ||
</simpara> | ||
<simpara> | ||
Without the second parameter, | ||
<function>mb_ltrim</function> will strip these characters: | ||
</simpara> | ||
&strings.stripped.characters; | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>string</parameter></term> | ||
<listitem> | ||
<simpara> | ||
The input string. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>characters</parameter></term> | ||
<listitem> | ||
&strings.parameter.characters.optional; | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>encoding</parameter></term> | ||
<listitem> | ||
<simpara> | ||
The string encoding. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<simpara> | ||
This function returns a string with whitespace stripped from the | ||
beginning of <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 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<refentry xml:id="function.mb-rtrim" xmlns="http://docbook.org/ns/docbook"> | ||
<refnamediv> | ||
<refname>mb_rtrim</refname> | ||
<refpurpose>Strip whitespace (or other characters) from the end of a 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> | ||
Performs a multi-byte safe <function>rtrim</function> operation, | ||
and returns a string with whitespace (or other characters) stripped from the | ||
end of <parameter>string</parameter>. | ||
</simpara> | ||
<simpara> | ||
Without the second parameter, | ||
<function>rtrim</function> will strip these characters: | ||
</simpara> | ||
&strings.stripped.characters; | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>string</parameter></term> | ||
<listitem> | ||
<simpara> | ||
The input string. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>characters</parameter></term> | ||
<listitem> | ||
&strings.parameter.characters.optional; | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>encoding</parameter></term> | ||
<listitem> | ||
<simpara> | ||
The string encoding. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<simpara> | ||
Returns the modified string. | ||
</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 | ||
--> |
Oops, something went wrong.