String Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > String commands > !STR.- String Command >

String Operations

STR.SplitString

Previous Top Next


MiniRobotLanguage (MRL)

 

STR.SplitString

Split a String by a Delimiter in 2 parts

 

clip0858

 

 

Intention

 

This command splits a source string (P1) into two parts based on a specified delimiting character (P2).

The results are placed on the Top of Stack (TOS) or in optional variables (P3 for left side, P4 for right side).

 

 

 

Syntax

 

 

STR.SplitString|P1|P2[|P3][|P4]

 

 

 

Parameter Explanation

 

P1 - (Source String) The string to be split.

P2 - (Delimiting Character) The character used to split the string.

P3 - (Optional) Variable for storing the left side of the split string. If omitted, the result is placed on TOS.

P4 - (Optional) Variable for storing the right side of the split string. If omitted, the result is placed on TOS.

 

 

 

Example

 

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

' IRS.-Sample

'***********************************
$$SRC=<Hello,World>

$$DLT=,

STR.SplitString|$$SRC|$$DLT|$$LEF|$$RIG

MBX.Left: $$LEF  Rifht: $$RIG

ENR.

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: