10 6 19 ContainsOnly

LANSA Technical

10.6.19 ContainsOnly

ContainsOnly compares the contents of the subject string against the characters supplied in the String parameter and returns a true if no other characters are found in the subject.

Input Parameters

String – Characters to compare against the subject

Example

In the example below, the string is tested to ensure that it only contains the digits 0 through 9 and a blank.  If other characters are used in #String, the function returns False.

 

If (#String.ContainsOnly( " 0123456789" ))

 

 Endif

 

Ý 10.6 Alphanumeric/String Intrinsic Functions