Difference between revisions of "WORDWRAP()"
From Recital Documentation Wiki
		
		
		
| Yvonnemilne  (Talk | contribs) | Yvonnemilne  (Talk | contribs)  | ||
| (3 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | ==Purpose== | |
| + | Function to wrap a string to a given line width  | ||
| − | + | ||
| − | + | ==Syntax== | |
| + | WORDWRAP(<expC1> [, <expN> [, <expC2> [, <expL>]]]) | ||
| + | |||
| + | |||
| + | ==See Also== | ||
| + | [[BOLD()]], [[CENTER()]], [[LPAD()]], [[REVERSE()]], [[RPAD()]], [[UNDERLINE()]] | ||
| + | |||
| + | |||
| + | ==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== | ||
| + | <code lang="recital"> | ||
| + | open database southwind | ||
| + | use customers | ||
| + | echo wordwrap(companyname,20,"<br>\n",.T.) | ||
| + | </code> | ||
| + | |||
| + | |||
| + | ==Products== | ||
| + | Recital Server, Recital, Recital Web  | ||
| + | [[Category:Documentation]] | ||
| + | [[Category:Functions]] | ||
| + | [[Category:String Data]] | ||
| + | [[Category:String Data Functions]] | ||
Latest revision as of 12:14, 13 January 2010
Purpose
Function to wrap a string to a given line width
Syntax
WORDWRAP(<expC1> [, <expN> [, <expC2> [, <expL>]]])
See Also
BOLD(), CENTER(), LPAD(), REVERSE(), RPAD(), UNDERLINE()
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.)
Products
Recital Server, Recital, Recital Web
