String Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > String commands > !STR.- String Command >

String Operations

STR.Wrap

Previous Top Next


MiniRobotLanguage (MRL)

 

STR.Wrap / STR.Wrp

If Result available

 

 

clip0832

 

Intention

 

This command is used to add paired characters to the beginning and end of a string.

It is particularly useful for enclosing text with parentheses, quotes, brackets, etc.

 

 

 

 

Syntax

 

 

STR.Wrap|P1|P2|P3[|P4]

 

 

Parameter Explanation

 

P1 - (Mainstring, Text) The source string that you want to wrap.

P2 - (Input, Text) The character(s) you want to add to the beginning of the source string.

P3 - (Input, Text) The character(s) you want to add to the end of the source string.

P4 - (Output, Text) Optional variable that will contain the result. If omitted, the result will be placed on TOS (Top Of Stack).

 

 

Example

 

'*****************************************************

' EXAMPLE 1: STR.Wrap

'*****************************************************

' The text will be wrapped and displayed as <MyWord>.

$$SRC="MyWord"

$$LFT="<"

$$RGT=">"

STR.Wrap|$$SRC|$$LFT|$$RGT|$$RES

MBX.$$RES

ENR.

 

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: