Skip to main content

Get-Substring-by-Range

Command Description

Extract the characters within the specified position range, starting from 1

Command Prototype

sRet = SubString(sData,iStart,iEnd)

Parameter Description

ParameterRequiredTypeDefaultDescription
sDataTruestring""Extracted raw string
iStartTruenumber1The position to start extracting the string
iEndTruenumber1The ending position of extracting the string

return

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

Demo

TracePrint("----------------------Extract characters at the specified location ----------------------- ---") 
//-------------------------------------------------------------------------------
//[Remarks] Extract the characters starting from the specified position to the end of the specified position from the string, and the position starts from 1.
//Input parameter 1:
// sData--The extracted source string.
//Input parameter 2:
// iStart--The starting position of the extracted string.
//Input parameter 3:
// iEnd--Extract the end position of the string.
//out parameters:
// sRet--The variable to which the output of the function call is saved.
//
//Command prototype: sRet=SubString(sData,iStart,iEnd)
//-------------------------------------------------------------------------------
sRet = SubString ("UiBot", 3.5)
TracePrint (sRet)