String Operations

<< Click to Display Table of Contents >>

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

String Operations

STR.RTrim -  - Remove multi character-sequences from right

Previous Top Next


MiniRobotLanguage (MRL)

 

STR.RTrim

   Remove multi character sequences from right side

 

 

Intention

 

The STR.RTrim Command is a powerful tool in SPR for removing specific sequences of characters from the right 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.RTrim Command removes all occurrences of a specified sequence of characters from the right 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 right side of a string.

 

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

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

 

Example:

 

' Define the input string

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

 

' Remove the sequence "/>"

STR.RTrim|$$STR|/>

 

' Display the result

MBX. Result: $$RES

' Result is: >/World>/

 

 

Syntax

 

STR.RTrim|P1|P2

 

 

Parameter Explanation

 

P1   - Source and Target-variable.

 

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

 

 

Example

 

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

'

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

END.

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

•     1.5.2 Working with Text-Strings

•     VBT. - Variable-Both-sides-Trim

•     VLT - Variable-Left-Trim

•     VRD. - Variable-Remove-Doubles

•     VTU. - Variable to Uppercase

•     VTL. - Variable to Lowercase

•     VTM. - Variable to Mediumcase

•     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