Smart Package Robot 's List Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Arrays and Data-Structures > LST. - List Arrays > Store/Restore-Operations >

 Smart Package Robot 's List Commands

LST.Export - Export List to a Delimited String

Previous Top Next


MiniRobotLanguage (MRL)

 

LST.Export

Export List to a Delimited String

 

 

Intention

 

The LST.Export command is used to export the contents of a list container into a delimited string. This is useful when you need to convert a list into a string format for storage, display, or further processing.

The default delimiter is a semicolon (;), but you can specify a custom delimiter if needed. If no variable is provided to store the result, the string is placed on the Top of Stack (TOS).

 

 

Syntax

 

LST.Export|P1[|P2][|P3]

 

 

Parameter Explanation

 

P1 - The handle of the list container. This is a numeric value or a variable that contains the handle of the list.

P2 - (Optional) The variable to store the resulting delimited string. If omitted, the result is placed on the Top of Stack (TOS).

P3 - (Optional) The delimiter used to separate values in the string. If omitted, the default delimiter ; is used.

 

 

Example

 

'***********************************

' LST.Export Sample Script

'***********************************

' Create a new list container

LST.New|$$LST

' Add values to the list

LST.Add|$$LST|Apple

LST.Add|$$LST|Banana

LST.Add|$$LST|Cherry

' Export the list to a delimited string

LST.Export|$$LST|$$STR

' Display the exported string

DBP.Exported string: $$STR

' Export with a custom delimiter

LST.Export|$$LST|$$STR2|,

' Display the exported string with custom delimiter

DBP.Exported string with custom delimiter: $$STR2

' End the script

ENR.

 

 

Remarks

 

-

 

 

Limitations:

- The delimiter must be a single character. Multi-character delimiters are not supported.

 

See also:

 

LST.New - Create a New List Container

LST.Add - Add a Value to the List

LST.Import - Import a Delimited String into a List