String Operations

<< Click to Display Table of Contents >>

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

String Operations

STR.Mid To

Previous Top Next


MiniRobotLanguage (MRL)

 

STR.Mid To

Extracts characters from a source string

 

 

Intention

 

This command extracts characters from a source string (P1), starting from a given position (P2) and ending at another position (P3).

The result is either placed back in the source string (P1) or in an optional variable (P4).

 

 

 

 

 

Syntax

 

 

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

 

 

 

Parameter Explanation

 

P1 - (Source String) The string from which to extract characters.

P2 - (Starting Position) The position in the source string from which to start extracting.

P3 - (End Position) The position in the source string where the extraction ends.

P4 - (Optional) Variable for storing the result. If omitted, the result is placed in P1.

 

 

 

Example

 

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

' STR.-Sample

'***********************************
$$SRC=HelloWorld

$$PO1=2

$$PO2=5

STR.MidTo|$$SRC|$$PO1|$$PO2

MBX.$$SRC

' Result in $$SRC: 'ello'

ENR.
 

 

 

 

 

 

 

Remarks

 

 -

 

 

Limitations:

 -

 

 

See also: