Skip to main content
Skip table of contents

p$TDV:Util:Element


p$TDV:Util:Element

Extract an element from an element list. This list contains names or descriptions separated by the separator symbol.

If the number element is no longer present, then an empty space is returned. This marks the end of the list. If the separator symbol does not appear in the text, then the entire text is returned.

Note: The function f$Element should generally be used instead of this procedure.

Syntax:

Element = p$TDV:Util:Element( Text , Number , Separator )

 

Argument

Type

Meaning

 

Text

String

Item list

 

Number

Integer

Running Number of the item searched for

 

Separator

String

Separator

Result:

String

Item searched for

Example:

A data array contains a list of text items separated by the ';' symbol:

Text = 'Component1;Component2;Component3'

 

This text results in:

Name = p$TDV:Util:Element( Text, 1, ';' )àName = 'Component1'
Name = p$TDV:Util:Element( Text, 2, ';' )àName = 'Component2'
Name = p$TDV:Util:Element( Text, 3, ';' )àName = 'Component3'
Name = p$TDV:Util:Element( Text, 4, ';' )àName = ''

Name = p$TDV:Util:Element( Text, 1, '-' )
àName = 'Component1;Component2; Component3'

JavaScript errors detected

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

If this problem persists, please contact our support.