Skip to main content

Right-Trim

Command Description

Delete specific characters from the right side of a specified string

Command Prototype

sRet = RTrim(sData,sTrim)

Parameter Description

ParameterRequiredTypeDefaultDescription
sDataTruestring""Modified string
sTrimTruestring""Enter a single character or a string of multiple characters. All combination of characters will be cropped

return

sRet,The variable used to save the output of the command.

Demo

TracePrint("----------------------Right cropping---------------------- --") 
//-------------------------------------------------------------------------------
//[Remarks] Delete the specific characters on the right side of the specified string.
//Input parameter 1:
// sData--the trimmed string.
//Input parameter 2:
// sTrim--a single character or a string of multiple characters to be trimmed.
//out parameters:
// sRet--The variable to which the output of the function call is saved.
//
//Command prototype: sRet=RTrim(sData,sTrim)
//-------------------------------------------------------------------------------
sRet=RTrim("UiBot123a","123a")
TracePrint (sRet)