Compare (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 1 minute read
- PI System
- PI Server 2023
- PI Server
Compare two strings using wildcard characters ("*" and "?").
Syntax
Compare(s1, s2 [,caseSensitive])
Arguments
s1, s2
Strings (s2 can contain wildcard characters)
caseSensitive
Optional flag indicating if the comparison is case sensitive. If False (the default), the comparison is case-insensitive. If True, the comparison is case-sensitive.
Returns
if s1 = s2
otherwise
Exceptions
Wildcard characters in s1 are treated literally and not as wildcards.
Example
compare("What","what",True) = 0
compare("b","a") = 0
compare("What","wha?") = 1
compare("What","wh") = 0