svn: /phpdoc/en/trunk/reference/strings/functions/ ucwords.xml

From: Date: Tue, 07 Jul 2015 16:20:58 +0000
Subject: svn: /phpdoc/en/trunk/reference/strings/functions/ ucwords.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-13444@lists.php.net to get a copy of this message
tyrael Tue, 07 Jul 2015 16:20:58 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=337118 Log: document the second optional delimiters argument for ucwords Changed paths: U phpdoc/en/trunk/reference/strings/functions/ucwords.xml Modified: phpdoc/en/trunk/reference/strings/functions/ucwords.xml =================================================================== --- phpdoc/en/trunk/reference/strings/functions/ucwords.xml 2015-07-07 14:45:18 UTC (rev 337117) +++ phpdoc/en/trunk/reference/strings/functions/ucwords.xml 2015-07-07 16:20:58 UTC (rev 337118) @@ -11,6 +11,9 @@ <methodsynopsis> <type>string</type><methodname>ucwords</methodname> <methodparam><type>string</type><parameter>str</parameter></methodparam> + <methodparam choice="opt"> + <type>string</type><parameter>delimiters</parameter><initializer>" \t\r\n\f\v"</initializer> + </methodparam> </methodsynopsis> <para> Returns a string with the first character of each word in @@ -18,8 +21,8 @@ </para> <para> The definition of a word is any string of characters that is immediately - after a whitespace (These are: space, form-feed, newline, carriage return, - horizontal tab, and vertical tab). + after any character listed in the <parameter>delimiters</parameter> parameter + (By default these are: space, form-feed, newline, carriage return, horizontal tab, and vertical tab). </para> </refsect1> @@ -35,6 +38,14 @@ </para> </listitem> </varlistentry> + <varlistentry> + <term><parameter>delimiters</parameter></term> + <listitem> + <para> + The optional <parameter>delimiters</parameter> contains the word separator characters. + </para> + </listitem> + </varlistentry> </variablelist> </para> </refsect1> @@ -46,6 +57,30 @@ </para> </refsect1> + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.4.32, 5.5.16</entry> + <entry> + Added the <parameter>delimiters</parameter> parameter. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + <refsect1 role="examples"> &reftitle.examples; <para> @@ -65,6 +100,22 @@ </programlisting> </example> </para> + + <para> + <example> + <title><function>ucwords</function> example with custom delimiter</title> + <programlisting role="php"> +<![CDATA[ +<?php +$foo = 'hello|world!'; +$bar = ucwords($foo); // Hello|world! + +$baz = ucwords($foo, "|"); // Hello|World! +?> +]]> + </programlisting> + </example> + </para> </refsect1> <refsect1 role="notes">

« previous php.doc.cvs (#13444) next »