String StartsWith

Determines whether the beginning of the String matches the specified String.

Syntax

StartsWith( string str, string strToCheck )

 

Parameters

str string The string to seek.
strToCheck string The sub string to be searched for in str.

 

Return Values

Return a boolean value.

 

Copy
Example
--This Program will demonstrate the String StratsWith operation. 

        
--"ScanMaster ScanScript" string assigned to variable "str"
str = "ScanMaster ScanScript" 
--Check for the string "Scan" at the start of the "str" string
if (String.StartsWith(str, "Scan")) then 
    Report("Test is True"
    else 
    Report("Test is False"
end