Skip to main content

String-Ends-with

Command Description

Determine if a string ends with a given substring

Command Prototype

bRet = EndsWith(sText,sEndsStr)

Parameter Description

ParameterRequiredTypeDefaultDescription
sTextTruestring""The target string to be determined
sEndsStrTruestring""The substring to check whether the input string ends with it

return

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

Demo

TracePrint("----------------------The judgment ends with the specified suffix-------------------- ----") 
//-------------------------------------------------------------------------------
//[Remarks] Determine whether the target string ends with the specified suffix string, if it ends with the specified suffix string, return true, otherwise return false. .
//Input parameter 1:
// sText--The target string to be judged.
//Input parameter 2:
// sEndsStr--Specified suffix string.
//out parameters:
// bRet--The variable to which the output of the function call is saved.
//
//Command prototype: bRet=EndsWith(sText,sEndsStr)
//-------------------------------------------------------------------------------
bRet=EndsWith("UiBot","Bot")
TracePrint(bRet)