mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
[PHP 8.4] Add mb_* functions (#3922)
Co-authored-by: Gina Peter Banyard <girgias@php.net> Co-authored-by: tekimen <youkidearitai@gmail.com>
This commit is contained in:
@@ -3774,6 +3774,50 @@ local: {
|
||||
'>
|
||||
|
||||
<!-- strings snippets -->
|
||||
<!ENTITY strings.stripped.characters '
|
||||
<itemizedlist xmlns="http://docbook.org/ns/docbook">
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>" "</literal> (<acronym>ASCII</acronym> 32 (0x20)), an ordinary space.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>"\t"</literal> (<acronym>ASCII</acronym> 9 (0x09)), a tab.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>"\n"</literal> (<acronym>ASCII</acronym> 10 (0x0A)), a new line (line feed).
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>"\r"</literal> (<acronym>ASCII</acronym> 13 (0x0D)), a carriage return.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>"\0"</literal> (<acronym>ASCII</acronym> 0 (0x00)), the NUL-byte.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>"\v"</literal> (<acronym>ASCII</acronym> 11 (0x0B)), a vertical tab.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
'>
|
||||
|
||||
<!ENTITY strings.parameter.characters.optional '
|
||||
<simpara xmlns="http://docbook.org/ns/docbook">
|
||||
Optionally, the stripped characters can also be specified using
|
||||
the <parameter>characters</parameter> parameter.
|
||||
Simply list all characters that need to be stripped.
|
||||
With <literal>..</literal> it is possible to specify an incrementing range of characters.
|
||||
</simpara>
|
||||
'>
|
||||
|
||||
<!ENTITY strings.parameter.encoding '
|
||||
<para xmlns="http://docbook.org/ns/docbook">
|
||||
An optional argument defining the encoding used when converting characters.
|
||||
|
||||
81
reference/mbstring/functions/mb-lcfirst.xml
Normal file
81
reference/mbstring/functions/mb-lcfirst.xml
Normal file
@@ -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
|
||||
-->
|
||||
92
reference/mbstring/functions/mb-ltrim.xml
Normal file
92
reference/mbstring/functions/mb-ltrim.xml
Normal file
@@ -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
|
||||
-->
|
||||
92
reference/mbstring/functions/mb-rtrim.xml
Normal file
92
reference/mbstring/functions/mb-rtrim.xml
Normal file
@@ -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
|
||||
-->
|
||||
89
reference/mbstring/functions/mb-trim.xml
Normal file
89
reference/mbstring/functions/mb-trim.xml
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<refentry xml:id="function.mb-trim" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mb_trim</refname>
|
||||
<refpurpose>Strip whitespace (or other characters) from the beginning and end of a 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>
|
||||
Performs a multi-byte safe <function>trim</function> operation,
|
||||
and returns a string with whitespace stripped from the
|
||||
beginning and end of <parameter>string</parameter>.
|
||||
Without the second parameter,
|
||||
<function>trim</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 <type>string</type> that will be trimmed.
|
||||
</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>
|
||||
The trimmed string.
|
||||
</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
|
||||
-->
|
||||
82
reference/mbstring/functions/mb-ucfirst.xml
Normal file
82
reference/mbstring/functions/mb-ucfirst.xml
Normal file
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<refentry xml:id="function.mb-ucfirst" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>mb_ucfirst</refname>
|
||||
<refpurpose>Make a string's first character uppercase</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>mb_ucfirst</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>ucfirst</function> operation,
|
||||
and returns a string with the first character of
|
||||
<parameter>string</parameter> capitalized, if that character is
|
||||
an ASCII character in the range from <literal>"a"</literal> (0x61) to
|
||||
<literal>"z"</literal> (0x7a).
|
||||
</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_lcfirst</function></member>
|
||||
<member><function>mb_convert_case</function></member>
|
||||
<member><function>ucfirst</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
|
||||
-->
|
||||
@@ -35,13 +35,16 @@
|
||||
<function name="mb_http_output" from="PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_internal_encoding" from="PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_language" from="PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_lcfirst" from="PHP 8 >= 8.4.0"/>
|
||||
<function name="mb_list_encodings" from="PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_ltrim" from="PHP 8 >= 8.4.0"/>
|
||||
<function name="mb_ord" from="PHP 7 >= 7.2.0, PHP 8"/>
|
||||
<function name="mb_output_handler" from="PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_parse_str" from="PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_preferred_mime_name" from="PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_regex_encoding" from="PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_regex_set_options" from="PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_rtrim" from="PHP 8 >= 8.4.0"/>
|
||||
<function name="mb_scrub" from="PHP 7 >= 7.2.0, PHP 8"/>
|
||||
<function name="mb_send_mail" from="PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_split" from="PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8"/>
|
||||
@@ -64,6 +67,8 @@
|
||||
<function name="mb_substr" from="PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_substr_count" from="PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8"/>
|
||||
<function name="mb_str_split" from="PHP 7 >= 7.4.0, PHP 8"/>
|
||||
<function name="mb_trim" from="PHP 8 >= 8.4.0"/>
|
||||
<function name="mb_ucfirst" from="PHP 8 >= 8.4.0"/>
|
||||
</versions>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
||||
@@ -13,85 +13,42 @@
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>characters</parameter><initializer>" \n\r\t\v\x00"</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<simpara>
|
||||
Strip whitespace (or other characters) from the beginning of a string.
|
||||
</para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
Without the second parameter,
|
||||
<function>mb_ltrim</function> will strip these characters:
|
||||
</simpara>
|
||||
&strings.stripped.characters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
You can also specify the characters you want to strip, by means of the
|
||||
<parameter>characters</parameter> parameter.
|
||||
Simply list all characters that you want to be stripped. With
|
||||
<literal>..</literal> you can specify a range of characters.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<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>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
This function returns a string with whitespace stripped from the
|
||||
beginning of <parameter>string</parameter>.
|
||||
Without the second parameter,
|
||||
<function>ltrim</function> will strip these characters:
|
||||
<!-- sorted by importance. Printed 3 times: trim, ltrim, rtrim -->
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
" " (<acronym>ASCII</acronym> <literal>32</literal>
|
||||
(<literal>0x20</literal>)), an ordinary space.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\t" (<acronym>ASCII</acronym> <literal>9</literal>
|
||||
(<literal>0x09</literal>)), a tab.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\n" (<acronym>ASCII</acronym> <literal>10</literal>
|
||||
(<literal>0x0A</literal>)), a new line (line feed).
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\r" (<acronym>ASCII</acronym> <literal>13</literal>
|
||||
(<literal>0x0D</literal>)), a carriage return.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\0" (<acronym>ASCII</acronym> <literal>0</literal>
|
||||
(<literal>0x00</literal>)), the <literal>NUL</literal>-byte.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\v" (<acronym>ASCII</acronym> <literal>11</literal>
|
||||
(<literal>0x0B</literal>)), a vertical tab.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
@@ -149,12 +106,10 @@ string(15) "Example string
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>trim</function></member>
|
||||
<member><function>rtrim</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>trim</function></member>
|
||||
<member><function>rtrim</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
@@ -13,87 +13,42 @@
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>characters</parameter><initializer>" \n\r\t\v\x00"</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<simpara>
|
||||
This function returns a string with whitespace (or other characters) stripped from the
|
||||
end of <parameter>string</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
Without the second parameter,
|
||||
<function>rtrim</function> will strip these characters:
|
||||
<!-- sorted by importance. Printed 3 times: trim, ltrim, rtrim -->
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
" " (<acronym>ASCII</acronym> <literal>32</literal>
|
||||
(<literal>0x20</literal>)), an ordinary space.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\t" (<acronym>ASCII</acronym> <literal>9</literal>
|
||||
(<literal>0x09</literal>)), a tab.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\n" (<acronym>ASCII</acronym> <literal>10</literal>
|
||||
(<literal>0x0A</literal>)), a new line (line feed).
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\r" (<acronym>ASCII</acronym> <literal>13</literal>
|
||||
(<literal>0x0D</literal>)), a carriage return.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\0" (<acronym>ASCII</acronym> <literal>0</literal>
|
||||
(<literal>0x00</literal>)), the <literal>NULL</literal>-byte.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\v" (<acronym>ASCII</acronym> <literal>11</literal>
|
||||
(<literal>0x0B</literal>)), a vertical tab.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</simpara>
|
||||
&strings.stripped.characters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The input string.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
You can also specify the characters you want to strip, by means
|
||||
of the <parameter>characters</parameter> parameter.
|
||||
Simply list all characters that you want to be stripped. With
|
||||
<literal>..</literal> you can specify a range of characters.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<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>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the modified string.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
@@ -149,12 +104,10 @@ string(15) " Example string"
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>trim</function></member>
|
||||
<member><function>ltrim</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>trim</function></member>
|
||||
<member><function>ltrim</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
@@ -14,85 +14,40 @@
|
||||
<methodparam><type>string</type><parameter>string</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>characters</parameter><initializer>" \n\r\t\v\x00"</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<simpara>
|
||||
This function returns a string with whitespace stripped from the
|
||||
beginning and end of <parameter>string</parameter>.
|
||||
Without the second parameter,
|
||||
<function>trim</function> will strip these characters:
|
||||
<!-- sorted by importance. Printed 3 times: trim, ltrim, rtrim -->
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
" " (<acronym>ASCII</acronym> <literal>32</literal>
|
||||
(<literal>0x20</literal>)), an ordinary space.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\t" (<acronym>ASCII</acronym> <literal>9</literal>
|
||||
(<literal>0x09</literal>)), a tab.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\n" (<acronym>ASCII</acronym> <literal>10</literal>
|
||||
(<literal>0x0A</literal>)), a new line (line feed).
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\r" (<acronym>ASCII</acronym> <literal>13</literal>
|
||||
(<literal>0x0D</literal>)), a carriage return.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\0" (<acronym>ASCII</acronym> <literal>0</literal>
|
||||
(<literal>0x00</literal>)), the <literal>NUL</literal>-byte.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
"\v" (<acronym>ASCII</acronym> <literal>11</literal>
|
||||
(<literal>0x0B</literal>)), a vertical tab.
|
||||
</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</simpara>
|
||||
&strings.stripped.characters;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <type>string</type> that will be trimmed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Optionally, the stripped characters can also be specified using
|
||||
the <parameter>characters</parameter> parameter.
|
||||
Simply list all characters that need to be stripped. With
|
||||
<literal>..</literal> it is possible to specify an incrementing range of characters.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>string</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <type>string</type> that will be trimmed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>characters</parameter></term>
|
||||
<listitem>
|
||||
&strings.parameter.characters.optional;
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
The trimmed string.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
@@ -210,13 +165,11 @@ array(3) {
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>ltrim</function></member>
|
||||
<member><function>rtrim</function></member>
|
||||
<member><function>str_replace</function></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<simplelist>
|
||||
<member><function>ltrim</function></member>
|
||||
<member><function>rtrim</function></member>
|
||||
<member><function>str_replace</function></member>
|
||||
</simplelist>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
||||
Reference in New Issue
Block a user