Unicode Intrinsic Functions - ContainsOnly Method

Test to see if the strings contains only the specified characters

Member of Unicode Intrinsic Functions (PRIM_LIBI.IUnicodeIntrinsics)

Parameters

NameTypeData TypeDescription
Result*Result (Optional)BooleanTrue if the string only contains the characters specified
String*InputUnicode StringCharacters to be compared against

Details

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.

Example

In the sample 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.
#Save.Enabled := #String.ContainsOnly( " 0123456789" )

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2