cvs: phpdoc /en/reference/strings/functions trim.xml

From: Date: Tue, 31 May 2005 21:10:49 +0000
Subject: cvs: phpdoc /en/reference/strings/functions trim.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969368385@lists.php.net to get a copy of this message
philip Tue May 31 17:10:49 2005 EDT Modified files: /phpdoc/en/reference/strings/functions trim.xml Log: WS for new doc style http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/trim.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/reference/strings/functions/trim.xml diff -u phpdoc/en/reference/strings/functions/trim.xml:1.8 phpdoc/en/reference/strings/functions/trim.xml:1.9 --- phpdoc/en/reference/strings/functions/trim.xml:1.8 Wed Dec 29 12:24:37 2004 +++ phpdoc/en/reference/strings/functions/trim.xml Tue May 31 17:10:49 2005 @@ -1,74 +1,72 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 --> - <refentry id="function.trim"> - <refnamediv> - <refname>trim</refname> - <refpurpose> - Strip whitespace (or other characters) from the beginning and end of a string - </refpurpose> - </refnamediv> - <refsect1> - <title>Description</title> - <methodsynopsis> - <type>string</type><methodname>trim</methodname> - <methodparam><type>string</type><parameter>str</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>charlist</parameter></methodparam> - </methodsynopsis> - <para> - This function returns a string with whitespace stripped from the - beginning and end of <parameter>str</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> <!-- not \v, since not supported by PHP --> - "\x0B" (<acronym>ASCII</acronym> <literal>11</literal> - (<literal>0x0B</literal>)), a vertical tab. - </simpara> - </listitem> - </itemizedlist> - </para> - <para> - You can also specify the characters you want to strip, by means - of the <parameter>charlist</parameter> parameter. - Simply list all characters that you want to be stripped. With - <literal>..</literal> you can specify a range of characters. - </para> - <example> - <title>Usage example of <function>trim</function></title> - <programlisting role="php"> +<refentry id="function.trim"> + <refnamediv> + <refname>trim</refname> + <refpurpose>Strip whitespace (or other characters) from the beginning and end of a string</refpurpose> + </refnamediv> + <refsect1> + <title>Description</title> + <methodsynopsis> + <type>string</type><methodname>trim</methodname> + <methodparam><type>string</type><parameter>str</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>charlist</parameter></methodparam> + </methodsynopsis> + <para> + This function returns a string with whitespace stripped from the + beginning and end of <parameter>str</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> <!-- not \v, since not supported by PHP --> + "\x0B" (<acronym>ASCII</acronym> <literal>11</literal> + (<literal>0x0B</literal>)), a vertical tab. + </simpara> + </listitem> + </itemizedlist> + </para> + <para> + You can also specify the characters you want to strip, by means + of the <parameter>charlist</parameter> parameter. + Simply list all characters that you want to be stripped. With + <literal>..</literal> you can specify a range of characters. + </para> + <example> + <title>Usage example of <function>trim</function></title> + <programlisting role="php"> <![CDATA[ <?php @@ -83,19 +81,19 @@ ?> ]]> - </programlisting> - </example> - <note> - <simpara> - The optional <parameter>charlist</parameter> parameter was - added in PHP 4.1.0 - </simpara> - </note> - <para> - See also <function>ltrim</function> and <function>rtrim</function>. - </para> - </refsect1> - </refentry> + </programlisting> + </example> + <note> + <simpara> + The optional <parameter>charlist</parameter> parameter was + added in PHP 4.1.0 + </simpara> + </note> + <para> + See also <function>ltrim</function> and <function>rtrim</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables:

« previous php.doc (#969368385) next »