String Operations

<< Click to Display Table of Contents >>

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

String Operations

STR.RemainAny

Previous Top Next


MiniRobotLanguage (MRL)

 

 
STR.RemainAny

Extract Remaining Substring After Any Specified Character

 

clip0846

 

Intention

 

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

This is particularly useful when you need to parse a string based on multiple possible delimiters or characters.

 

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.RemainAny|P1|P2|P3[|P4]

 

 

 

Parameter Explanation

 

P1 - Source string from which to extract.

P2 - Characters to search for (ANY option).

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.RemainAny|$$SRC|$$SEA|$$STA|$$RES
' Result: $$RES will contain " World!"

ENR

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

  Str-Extractany