Sign in Join
FPDoc Onlineexperiment

WrapText function

In unit sysutils

Word-wrap a text.

Declaration

pascal
function WrapText(const Line: string; const BreakStr: string; 
 const BreakChars: TSysCharSet; MaxCol: Integer)
: string

Description

WrapText does a wordwrap at column MaxCol of the string in Line. It breaks the string only at characters which are in BreakChars (default whitespace and hyphen) and inserts then the string BreakStr (default the lineending character for the current OS).

Portions of text that are between single or double quotes will be considered single words and the text will not be broken between the quotes.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.