String Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > String commands > !Trim String >

String Operations

STR.LTrim - Remove multi character-sequences from left side

Previous Top Next


MiniRobotLanguage (MRL)

 

 

STR.LTrim

   Remove multi character sequences from the left side

 

 

Intention

 

The STR.LTrim command is a powerful tool in SPR for removing specific sequences of characters from the left side of a string.

It works by exactly matching the sequence you provide and removing it from the string.

 

This is particularly useful when you need to clean up strings or remove unwanted patterns without affecting other parts of the string.

The STR.LTrim command removes all occurrences of a specified sequence of characters from the left side of a string.

It only removes exact matches, so if the sequence appears in a different order or with extra characters, it will not be affected.

 

Key Features:

Removes exact sequences of characters from the left side of a string.

 

Works on all occurrences of the sequence on the left side of the string. Leaves the rest of the string untouched.

For removing Single characters better use the VLT.-Command. This one is only to remove sequences, which can not be done with VLT.

 

Example:

 

' Define the input string

$$STR =/>/>>/World/>

 

' Remove the sequence "/>"

STR.LTrim|$$STR|/>

 

' Display the result

MBX. Result: $$RES

' Result is: >/World/>

 

 

Syntax

 

STR.LTrim|P1|P2

 

 

Parameter Explanation

 

P1   - Source and Target-variable.

 

P2   - The exact sequence of the characters will be removed from the left side of P1

 

 

Example

 

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

'

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

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    1.5.2 Working with Text-Strings

    VBT. - Variable-Both-sides-Trim

    VRT. - Variable-Right-Trim

    VTU. - Variable to Uppercase

    VTL. - Variable to Lowercase

    VTM. - Variable to Mediumcase

    VRD. - Variable-Remove-Doubles

    GFS. - Get-Filtered-String

    VAR. - Variable Set Value/Clear

    IVS. / NVS. - If-Variable-String

    ! STR. - String Command

    GSS. - GetSplitString

    GES. - Get-Extracted-String

    SBD. - String between Delimiter

    SBM. - String between Delimiter-Multiple

    FEM. - For Each Member

    LEN. - Length-of-String

    RPL. - RePLace in String