Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI System Management Tools

Compare (Tag-based PE function)

  • Last UpdatedOct 04, 2024
  • 1 minute read

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

1 if s1 = s2

0 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

In This Topic
TitleResults for “How to create a CRG?”Also Available in