Trim
Command Description
Delete specific characters from both ends of a specified string
Command Prototype
sRet = Trim(sData,sTrim)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
sData | True | string | "" | Modified string |
sTrim | True | string | "" | 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("----------------------Cut both sides---------------------- --")
//-------------------------------------------------------------------------------
//[Remarks] Delete specific characters on both sides of the specified string.
//Input parameter 1:
// sData--the trimmed string.
//Input parameter 2:
// sTrim--a single character or a string of multiple characters.
//out parameters:
// sRet--The variable to which the output of the function call is saved.
//
//Command prototype: sRet=Trim(sData,sTrim)
//-------------------------------------------------------------------------------
sRet = Trim ("UiBot", "Ui")
TracePrint (sRet)