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

AVEVA™ Plant SCADA

StringTest()

  • Last UpdatedJul 13, 2023
  • 1 minute read

Tests the first character of text to determine whether it is of a certain type and returns the result.

Category

String

Syntax

DiscreteResult = StringTest( Text, TestType );

Parameters

Text

String that function acts on. Actual string or a string equipment.item.

TestType

Determines the type of test. Possible values are:

1 = Alphanumeric character ('A-Z', 'a-z' and '0-9')

2 = Numeric character ('0- 9')

3 = Alphabetic character ('A-Z' and 'a-z')

4 = Uppercase character ('A-Z')

5 = Lowercase character ('a'-'z')

6 = Punctuation character (0x21-0x2F)

7 = ASCII characters (0x00 - 0x7F)

8 = Hexadecimal characters ('A-F' or 'a-f' or '0-9')

9 = Printable character (0x20-0x7E)

10 = Control character (0x00-0x1F or 0x7F)

11 = White Space characters (0x09-0x0D or 0x20)

Remarks

StringTest() function returns true to DiscreteResult if the first character in Text is of the type specified by TestType. Otherwise, false is returned. If the StringTest() function contains more than one character, only the first character of the equipment.item is tested.

Examples

StringTest("ACB123",1) ' returns 1;

StringTest("ABC123",5) ' returns 0;

See Also

StringASCII(), StringChar(), StringFromIntg(), StringFromReal(), StringFromTime(), StringInString(), StringLeft(), StringLen(), StringLower(), StringMid(), StringReplace(), StringSpace(), StringToIntg(), StringToReal(), StringTrim(), StringUpper(), Text()

String Functions

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