May 13, 2021 VBScript
The VBScript Filter function returns an array with a subset of strings with a lower limit of 0, depending on the filter specified.
The Filter function returns a 0-based array that contains a subset of string arrays based on a particular filter.
Note: If no value can be found that matches the value parameter, the Filter function returns an empty array.
Note: An error occurs if the parameter inputstrings is Null or is not a one-dimensional array.
parameter | describe |
---|---|
inputstrings | Required.A one-dimensional string array to retrieve. |
value | Required.String to search. |
include | Optional.Boolean value, specify whether the returned sub-string contains Value.If INCLUDE is True, Filter will return an array subset that contains the substring value.If INCLUDE is False, Filter will return an array subset that does not contain sub-string value VALUE.The default is TRUE. |
compare |
Optional.The string comparison type to use is specified.
The following values can be used:
|
Filter: The project contains an "S":
The above example output results:
Filter: "S" that is not included in the project:
The above example output results:
Filter: Items that contain "S" are compared in text (compare=1):
The above example output results: