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

AVEVA™ InTouch HMI

StringCompareNoCase() Function

  • Last UpdatedFeb 21, 2017
  • 1 minute read

Compares two strings with each other and returns an integer result. The case of each letter is not respected so that, for example, ‘A’ is considered equal to ‘a’.

The integer result returns:

  • 0 if both strings are identical (ignoring case).

  • Non-zero otherwise. The result is the difference of ASCII values between the differentiating character (ignoring case).

    Note: The result of the StringCompareNoCase() function can be used as a discrete result, as all non-zero values are considered to equal TRUE in InTouch scripting.

Syntax

result = StringCompareNoCase (string1, string2)

Parameters

string1

A literal string, message tagname, or string expression.

string2

A literal string, message tagname, or string expression.

Example(s)

This string returns 0—because the strings are considered identical:

StringCompareNoCase("Apple","apple")

This string returns -6—because the strings are considered not identical and the ASCII values of the first differentiating character "p" minus the ASCII value of the corresponding letter "v" equals -6:

StringCompareNoCase("Apple","Avocado")

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