String Operations

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

String Operations

BLO.Template

Overview Top


MiniRobotLanguage (MRL)

 

BLO.Template

Extract template tokens between delimiters as a comma-separated list.

 

Intention

Extract all occurrences between start and end delimiters and return them as one comma-separated result string.

Typical usage is scanning prompt templates or custom markers, for example [T]name[/T].

 

Syntax

BLO.Template|P1|P2|P3[|P4]

BLO.BTM|P1|P2|P3[|P4]

 

Parameter Explanation

-P1 - Source text.

-P2 - Start delimiter.

-P3 - End delimiter.

-P4 - Optional result variable, otherwise TOS.

 

Example

$$SRC=[T]name[/T] and [T]id[/T] and [T]name[/T]

BLO.Template|$$SRC|[T]|[/T]|$$RES

' $$RES = name,id,name

ENR.

 

Remarks

-Order is preserved.

-Current implementation has a safety limit of 100 extracted items.

-Empty input or empty delimiters produce empty output.

 

See also:

BLO.Code

BLO.PromptSection

Block Commands Overview