WORDWRAP()

From Lianjapedia
Revision as of 07:01, 4 February 2013 by Helen.george (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose

Function to wrap a string to a given line width

Syntax

WORDWRAP(<expC1> [, <expN> [, <expC2> [, <expL>]]])

See Also

CENTER(), LPAD(), RPAD()

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.)