<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > !STR.- String Command > String Operations |
MiniRobotLanguage (MRL)
STR.ClipMid
Remove Characters from the Middle of a String
Intention
This command is used to remove a specified number of characters from the middle of a given string in P1, starting at a specific position P2.
If P4 is omitted, the result will be placed back in P1.
Syntax
STR.ClipMid|P1|P2|P3[|P4]
Parameter Explanation
•P1 - (Mainstring, Text) Variable with the source string.
•P2 - (Input, Numeric) Start position from where the characters will be removed.
•P3 - (Input, Numeric) Number of characters to remove from the start position.
•P4 - (Output, Text) Optional variable that will contain the result. If omitted, the result will be placed back in P1.
Example
'***********************************
' IRS.-Sample
'***********************************
' $$RES will contain 'He World'
' Remove 5 characters from the middle of the string starting at position 3
$$SRC=Hello World
$$STA=3
$$CNT=5
STR.ClipMid|$$SRC|$$STA|$$CNT|$$RES
ENR.
Remarks
-
Limitations:
-
See also:
•