Filter searches an array of strings for a specified string, and returns the strings in an array.
The following examples are applicable to Basic and Crystal syntax.
The examples assume that inputStrings is a String array consisting of the 5 elements: "pineapple", "Apple", "APPLE", "grape", and "orange".
Returns an array containing the 2 strings "pineapple" and "grape".
Filter (inputStrings, "Ap", True)
Returns an array containing the 1 string "Apple".
Filter (inputStrings, "ap", True, 1)
Returns an array containing the 4 strings "pineapple", "Apple", "APPLE" and "grape". Matching to the search string uses case
Filter (inputStrings, "ap", False)
Returns an array containing the 3 strings "Apple", "APPLE" and "orange".
Returns an array containing 1 string, the empty string "". The returned array does not contain any matching strings but contains 1 element since the formula language does not support empty arrays.
This function is designed to work like the Visual Basic function of the same name.
| Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |