<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > !STR.- String Command > String Operations |
MiniRobotLanguage (MRL)
STR.DELETE
String commands
Intention
DELETE - Mode: Delete bytes/chars from inside the string. In this example, we are going to delete the Letters "AB" out of this string.
The result is as expected:
The string is deleted from Byte 6 to Byte 7.
Syntax
STR.DELETE|P1|P2|P3
Parameter Explanation
P1 - Source and destination variable
P2 - numeric parameter, will be completely resolved.
Start Position, first byte that is been deleted.
P3 - numeric parameter, will be completely resolved. End position.
Last byte that is been deleted.
if any of the numerical parameters evaluates to 0, nothing is been deleted.
Example
'*************************************
' STR.
'*************************************
VAR.$$SRC=12345AB6789
STR.DELETE|$$SRC|6|7
MBX.$$SRC
ENR.
Remarks
Variables inside the source P1 are only resolved once. Therefore it can be safely used for binary data. Specialfolders and systemvariables etc. are not resolved, to avoid unwanted changes in binary data..
Limitations:
-
See also:
• 1.5.2 Working with Text-Strings
• VAR. - Variable Set Value/Clear
• IVS. / NVS. - If-Variable-String
• SBD. - String between Delimiter
• SBM. - String between Delimiter-Multiple