Skip to main content

Get-a-String-on-the-Left

Command Description

Get a string on the left

Command Prototype

sRet = Left(sText,iSize)

Parameter Description

ParameterRequiredTypeDefaultDescription
sTextTruestring""The string to be operated
iSizeTruenumber1The length of string (in unit) to get

return

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

Demo

TracePrint("----------------------Get the left string-------------------- ----") 
//-------------------------------------------------------------------------------
//[Remarks] Get the string on the left.
//Input parameter 1:
// sText--A string to operate on.
//Input parameter 2:
// iSize--How many units of string to get.
//out parameters:
// iRet--The variable to which the output of the function call is saved.
//
//Command prototype: sRet=Left(sText,iSize)
//-------------------------------------------------------------------------------
sRet = Left ("UiBot", 2)
TracePrint (sRet)