String Operations

<< Click to Display Table of Contents >>

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

String Operations

STR.Mid Str

Previous Top Next


MiniRobotLanguage (MRL)

 

STR.Mid Str / STR.Mid

Extracts characters from a source string

 

clip0862

      Result from the Script-Sample below.

 

 

Intention

 

This command extracts a specified number of characters (P3) from a source string (P1), starting from a given position (P2). The result is either placed back in the source string (P1) or in an optional variable (P4).

 

 

 

 

Syntax

 

 

STR.Mid|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 - (Number of Characters) The number of characters to take from the starting position.

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

 

 

 

Example

 

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

' STR.-Sample

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

$$POS=2

$$NUM=5

STR.Mid|$$SRC|$$POS|$$NUM

MBX.$$SRC

ENR.

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: