Difference between revisions of "WORDWRAP()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to wrap a string to a given line width | Function to wrap a string to a given line width | ||
− | |||
==Syntax== | ==Syntax== | ||
WORDWRAP(<expC1> [, <expN> [, <expC2> [, <expL>]]]) | WORDWRAP(<expC1> [, <expN> [, <expC2> [, <expL>]]]) | ||
− | |||
==See Also== | ==See Also== | ||
− | + | [[CENTER()]], [[LPAD()]], [[RPAD()]] | |
− | + | ||
==Description== | ==Description== | ||
The WORDWRAP() function wraps the character string <expC1> to a given line width. The line width defaults to 80 characters if not specified in the optional <expN>. An alternative line break character may be specified in <expC2>. By default, words longer than the line width are not wrapped. To wrap them, the optional <expL> should be set to true (.T.). | The WORDWRAP() function wraps the character string <expC1> to a given line width. The line width defaults to 80 characters if not specified in the optional <expN>. An alternative line break character may be specified in <expC2>. By default, words longer than the line width are not wrapped. To wrap them, the optional <expL> should be set to true (.T.). | ||
− | |||
==Example== | ==Example== | ||
Line 22: | Line 18: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:String Data]] | [[Category:String Data]] | ||
[[Category:String Data Functions]] | [[Category:String Data Functions]] |
Revision as of 09:53, 10 February 2012
Contents
Purpose
Function to wrap a string to a given line width
Syntax
WORDWRAP(<expC1> [, <expN> [, <expC2> [, <expL>]]])
See Also
Description
The WORDWRAP() function wraps the character string <expC1> to a given line width. The line width defaults to 80 characters if not specified in the optional <expN>. An alternative line break character may be specified in <expC2>. By default, words longer than the line width are not wrapped. To wrap them, the optional <expL> should be set to true (.T.).
Example
open database southwind use customers echo wordwrap(companyname,20,"<br>\n",.T.)