String Operations

<< Click to Display Table of Contents >>

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

String Operations

STR.Remain

Previous Top Next


MiniRobotLanguage (MRL)

 

STR.Remain

Extract Remaining Substring After Specified String

 

clip0847

 

 

 

Intention

 

This command is used to extract the remaining substring from a main string after the first occurrence of a specified string.

This is useful for parsing strings or extracting the remaining data after a specific delimiter or keyword.

The command is case-sensitive.

If P3 is zero, or beyond the length of P1, a null string is returned.

If P3 is negative, the starting position is counted from right to left.

If P2 is not present in P1, or either string parameter is null, a null string is returned.

 

 

 

Syntax

 

 

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

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

 

 

 

Parameter Explanation

 

P1 - Source string from which to extract.

P2 - String to search for.

P3 - Optional starting position in the source string.

P4 - Optional variable for result (if omitted, result is placed in P1).

 

 

 

 

Example

 

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

' STR.-Sample

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

$$SEA=,

$$STA=1

STR.Remain|$$SRC|$$SEA|$$STA|$$RES

Result: $$RES will contain " World!"

ENR.

 

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    STR.Extract