String-Comparision
Command Description
Compare two strings, return true if they are identical, and return false otherwise
Command Prototype
bRet = StrComp(s1,s2,bCompare)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
s1 | True | string | "" | The first string to be compared |
s2 | True | string | "" | The second string to be compared |
bCompare | True | boolean | None | Whether to be case sensitive when strings are compared |
return
bRet,The variable used to save the output of the command.
Demo
TracePrint("----------------------String comparison---------------------- --")
//-------------------------------------------------------------------------------
//[Remarks] Compare two strings, return true if the strings are the same, and return false if they are not.
//Input parameter 1:
// s1--The first string to compare.
//Input parameter 2:
// s2--The second string to compare.
//Input parameter 3:
// bCompare--Whether it is case sensitive when comparing strings.
//out parameters:
// bRet--The variable to which the output of the function call is saved.
//
//Command prototype: bRet=StrComp(s1,s2,bCompare)
//-------------------------------------------------------------------------------
bRet=StrComp("UiBot","Ui",True)
TracePrint(bRet)