String Operations

<< Click to Display Table of Contents >>

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

String Operations

STR.CLONE

Previous Top Next


MiniRobotLanguage (MRL)

 

STR.CLONE

String commands

 

 

Intention

 

CLONE - Mode. This command will create a new String. by appending a specified second string for a given number of times.  The result is a string, consisting of multiple copies of the second specified string. Here is an example:

 

graphic

 

And this is the result:

 

graphic

 

We have created a new String that consists of 5 times the given second string. In the same way, you can make a string that is filled with SPACES or zero'es.

 

VAR.$$NEU=$nul$

STR.CLONE|$$SRC|3|$$NEU

MBX.$$SRC

ENR.

 

or

 

VAR.$$NEU=$sp$

STR.CLONE|$$SRC|3|$$NEU

MBX.<$$SRC>

ENR.

 

 

 

Syntax

 

STR.CLONE|P1|P2|P3

 

 

Parameter Explanation

 

P1 - destination variable

 

P2 - numeric parameter, will be completely resolved

 

P3 - Clone-String

 

 

 

 

Example

 

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

' STR.CLONE

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

VAR.$$NEU=Neu

STR.CLONE|$$SRC|5|$$NEU

MBX.$$SRC

ENR.

ENR.

 

 

 

Remarks

 

Variables inside the source are only resolved once. Therefore it can be safely used for binary data. Specialfolders and systemvariables etc. are not resolved, to avoid unwanted changes in binary data.

 

To Replace bytes in a String, use the RPL. - RePLace in String command.

To extract a part out of a String, use the GSS. - GetSplitString command.

If your String is a delimited String (like a .csv-file), use:

 

    SBD. - String between Delimiter

    SBM. - String between Delimiter-Multiple

 

 

 

Limitations:

 

-

 

 

See also:

 

    1.5.2 Working with Text-Strings

    VAR. - Variable Set Value/Clear

    VAS. - Variable with String

    RPL. - RePLace in String

    IVS. / NVS. - If-Variable-String

    GSS. - GetSplitString

    GES. - Get-Extracted-String

    GFS. - Get-Filtered-String

    SBD. - String between Delimiter

    SBM. - String between Delimiter-Multiple

    FEM. - For Each Member

    LEN. - Length-of-String