String Operations

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

String Operations

BLO.IndexBy

Overview Top


MiniRobotLanguage (MRL)

 

BLO.IndexBy

Find index of first block containing a search text.

 

Intention

Scan blocks from left to right and return the first matching block index.

Case sensitivity is controlled by the CI flag.

 

Syntax

BLO.IndexBy|P1|P2|P3|P4|P5|P6

BLO.BIB|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 - Result variable, returns index or 0.

 

Example

$$SRC=[B]Alpha[/B] [B]beta[/B] [B]GAMMA[/B]

BLO.IndexBy|$$SRC|[B]|[/B]|gamma|1|$$IDX

' $$IDX = 3

ENR.

 

Remarks

-Returns 0 when nothing matches.

-Current implementation has an internal scan safety limit.

 

See also:

BLO.Filter

BLO.Slice