StringTest() Function
- Last UpdatedFeb 21, 2017
- 1 minute read
Tests whether the first character of a string is in a certain group of characters.
Syntax
result = StringTest (string, group)
Parameters
string
A literal string, message tagname, or string expression.
group
The number of the group to test the character against. A literal value, integer tagname, or integer expression in the range of 1 to 11.
1 - alphanumeric characters (A-Z, a-z, 0-9)
2 - numeric characters (0-9)
3 - alphabetic characters (A-Z, a-z)
4 - uppercase characters (A-Z)
5 - lowercase characters (a-z)
6 - punctuation characters (ASCII 0x21 - 0x2F), for example !,@,#,$,%,^,&,* and so on
7 - ASCII characters (ASCII 0x00 - 0x7F)
8 - Hexadecimal characters (0-9, A-F, a-f)
9 - Printable characters (ASCII 0x20 - 0x7E)
10 - Control characters (ASCII 0x00 - 0x1F and 0x7F)
11 - White space characters (ASCII 0x09 - 0x0D and 0x20)
Example(s)
This string returns a 1—because "A" is an alphanumeric character:
StringTest("ACB123",1)
This string returns a 0—because "A" is not a lowercase character:
StringTest("ABC123",5)