Fix bug #64092, Added description and example for parameter "cut" is false and word is long than width.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@336614 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Pasindu De Silva 2015-04-22 14:25:37 +00:00
parent e6bb64e5e0
commit 2ee8e560cb

View file

@ -55,9 +55,10 @@
<listitem>
<para>
If the <parameter>cut</parameter> is set to &true;, the string is
always wrapped at or before the specified width. So if you have
always wrapped at or before the specified <parameter>width</parameter>. So if you have
a word that is larger than the given width, it is broken apart.
(See second example).
(See second example). When &false; the function dose not split the word until the end of the word
even if the <parameter>width</parameter> is smaller than the word width.
</para>
</listitem>
</varlistentry>
@ -115,6 +116,29 @@ A very
long
wooooooo
ooooord.
]]>
</screen>
</example>
<example>
<title><function>wordwrap</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$text = "A very long woooooooooooooooooord. and something";
$newtext = wordwrap($text, 8, "\n", false);
echo "$newtext\n";
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
A very
long
woooooooooooooooooord.
and
something
]]>
</screen>
</example>