<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > !STR.- String Command > String Operations |
MiniRobotLanguage (MRL)
STR.Shrink
Remove multiple delimiters
Intention
The STR.Shrink command is designed to create a string where consecutive data items (words) are separated by a consistent single character.
This makes it easier to parse the string later.
Example:
Using STR.Shrink with only the source string
$$SRC= Hello World
STR.Shrink|$$SRC||$$RES
$$RES will contain 'Hello World'
Syntax
STR.Shrink|P1[|P2|P3]
Parameter Explanation
•P1 - (Mainstring, Text) Variable with the source string.
•P2 - (Input, Text) Optional Mask string for delimiters.
•P3 - (Output, Text) Optional variable that will contain the result. The result will be put in P1 if this parameter is omitted.
Example
'***********************************
' STR.-Sample
'***********************************
$$SRC=,,Hello,,World,,
$$MSK=,
STR.Shrink|$$SRC|$$MSK|$$RES
' $$RES will contain:
',Hello,World
Remarks
-
Limitations:
-
See also:
•