|
<< Click to Display Table of Contents >> Navigation: »No topics above this level« String Operations |
MiniRobotLanguage (MRL)
BLO.Position
Return start and optional end position of the Nth block.
Intention
Identify where a selected block starts and ends inside the source text.
Useful for diagnostics and for additional substring operations.
Syntax
BLO.Position|P1|P2|P3|P4|P5[|P6]
BLO.BPO|P1|P2|P3|P4|P5[|P6]
Parameter Explanation
-P1 - Source text.
-P2 - Start delimiter.
-P3 - End delimiter.
-P4 - Block index N (1-based).
-P5 - Result variable for start position.
-P6 - Optional result variable for end position.
Example
$$SRC=xx[A]one[/A]yy[A]two[/A]zz
BLO.Position|$$SRC|[A]|[/A]|2|$$S|$$E
' $$S = 15
' $$E = 24
ENR.
Remarks
-Returns 0 for not found start or end positions.
-Current position lookup is not nesting-aware.
See also: