Skip to main content
Skip table of contents

p$TDV:Util:SplitTxt


p$TDV:Util:SplitTxt

Split a multiline text into separate text lines that are transferred to a given string array. The number of lines found is returned.

As line separators the characters return (ASCII-Code 13) and newline (ASCII-Code 10) or a combination of both is possible.

Please note: The array name is assigned directly (as a string), and is therefore surrounded in quotation marks. Moreover, to ensure data access the parameter has to be global .

Syntax:

NumRows = p$TDV:Util:SplitTxt( 'LineArray', Text )

 

Argument

Type

Meaning

 

RowArray

String

Array name of the array filled with single rows. Remaining field elements are assigned EMPTY.

 

Text

String

Text with line breaks

Result:

Integer

Number of lines found (Completion of the parameter RowArray)

Example:

Decomposition of an address:

Address = 'Franz Müller
Rosenweg 2
12345 Blumendorf'

Num = p$TDV:Util:DecompText( 'Lines', Address)

àNum = 3
Lines[1] = 'Franz Müller'
Lines[2] = 'Rosenweg 2'
Lines[3] = '12345 Blumendorf'

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.