String Operations

<< Click to Display Table of Contents >>

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

String Operations

STR.DelPrefix

Previous Top Next


MiniRobotLanguage (MRL)

 

STR.DelPrefix

Removes unnecessary prefixes from a string, targeting those ending with a colon and linefeeds.

 

clip0863

 

Intention

 

This command is designed to remove prefixes from AI-Output.

Sometimes ChatGPT will prefix answers with "Certainly ....:" and such prefixes which are followed by the real answer.
This command will detect these prefixes by searching for the ":" and the following line feeds and if this is found,

the complete prefix will be deleted.

The result is either placed back in the source string (P1) or in an optional variable (P2).

 

 

 

 

Syntax

 

 

STR.DelPrefix|P1[|P2]

 

 

 

Parameter Explanation

 

P1 - (Source String) The string from which to remove the prefix.

P2 - (Optional) Variable for storing the result. If omitted, the result is placed in P1.

 

 

 

Example

 

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

' STR.-Sample

'***********************************
$$SRC=Certainly you can ...:$crlf$Hello World

STR.DelPrefix|$$SRC

MBX.$$SRC

ENR.

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: