Filter

STD.Str.Filter( source, filterstring )

STD.Uni.Filter( source, filterstring )

sourceA string containing the data to filter.
filterstring A string containing the characters to use as the filter.
Return: Filter returns a STRING or UNICODE value, as appropriate.

The StringFilter functions return the source string with all the characters except those in the filterstring removed.

Example:

//all these examples result in 'Success'

A := IF(STD.Str.Filter('ADCBE', 'BD') = 'DB',
   'Success',
   'Failure - 1');
    
B := IF(STD.Str.Filter('ADCBEREBD', 'BDG') = 'DBBD',
   'Success',
   'Failure - 2');
    
C := IF(STD.Str.Filter('ADCBE', '') = '',
   'Success',
   'Failure - 3');
   
D := IF(STD.Str.Filter('', 'BD') = '',
   'Success',
   'Failure - 4');
    
E := IF(STD.Str.Filter('ABCDE', 'EDCBA') = 'ABCDE',
   'Success',
   'Failure - 5');