|
<< Click to Display Table of Contents >> Navigation: »No topics above this level« String Operations |
MiniRobotLanguage (MRL)
BLO.Filter
Filter blocks by search text into ARR and return match count.
Intention
Select only blocks that contain the requested search text.
Matching blocks are stored in an ARR array and count is returned on TOS.
Syntax
BLO.Filter|P1|P2|P3|P4|P5|P6
BLO.BFL|P1|P2|P3|P4|P5|P6
Parameter Explanation
-P1 - Source text.
-P2 - Start delimiter.
-P3 - End delimiter.
-P4 - Search text.
-P5 - Case flag (0=case-sensitive, 1=case-insensitive).
-P6 - Target ARR number.
Example
$$SRC=[R]apple[/R] [R]banana[/R] [R]apricot[/R] [R]grape[/R]
BLO.Filter|$$SRC|[R]|[/R]|ap|1|9
ARR.Get|9|0|$$A
' $$A = [R]apple[/R]
ENR.
Remarks
-No match clears the target array and returns 0.
-Supports case-sensitive and case-insensitive filtering.
See also: