<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > !STR.- String Command > String Operations |
MiniRobotLanguage (MRL)
STR.Unwrap
Remove paired characters from the beginning and end of a string.
Intention
This command is used to remove specific characters from both the beginning and the end of a string.
It's particularly useful for removing parentheses, quotes, brackets, etc., from a text item.
Syntax
STR.Unwrap|P1|P2|P3[|P4]
Parameter Explanation
•P1 - (Mainstring, Text) Variable with the text (Mainstring) from which characters will be removed.
•P2 - (Input, Text) Variable with the characters to remove from the beginning of the Mainstring.
•P3 - (Input, Text) Variable with the characters to remove from the end of the Mainstring.
•P4 - (Output, Text) Optional variable that will contain the result. If omitted, the result will be placed on TOS (Top of Stack).
Example
'*****************************************************
' EXAMPLE 1: STR.Unwrap
'*****************************************************
' The text "MyWord" will be displayed.
$$SRC=<MyWord>
$$LFT=<
$$RGT=>
STR.Unwrap|$$SRC|$$LFT|$$RGT|$$RES
MBX.$$RES
ENR.
Remarks
-
Limitations:
-
See also:
• ! Smart Package Robot 's Parallel Robot Operations