|
<< Click to Display Table of Contents >> Navigation: »No topics above this level« String Operations |
MiniRobotLanguage (MRL)
BLO.Slice
Return a concatenated range of blocks by index interval.
Intention
Collect all blocks from FromIdx to ToIdx inclusive and concatenate them in source order.
No additional separators are inserted.
Syntax
BLO.Slice|P1|P2|P3|P4|P5|P6
BLO.BSL|P1|P2|P3|P4|P5|P6
Parameter Explanation
-P1 - Source text.
-P2 - Start delimiter.
-P3 - End delimiter.
-P4 - From index (1-based).
-P5 - To index (inclusive).
-P6 - Result variable.
Example
$$SRC=[B]A[/B][B]B[/B][B]C[/B][B]D[/B]
BLO.Slice|$$SRC|[B]|[/B]|2|3|$$RES
' $$RES = [B]B[/B][B]C[/B]
ENR.
Remarks
-If ToIdx is less than FromIdx, result is empty.
-Stops when requested index no longer exists.
See also: