mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
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:
parent
e6bb64e5e0
commit
2ee8e560cb
1 changed files with 26 additions and 2 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue