Name
Filter Function — Microsoft.VisualBasic.Strings
Synopsis
Filter(Source
,Match
[,Include
[,Compare
]])
Source
required; String or ObjectAn array containing values to be filtered.
Match
required; StringThe substring of characters to find in the elements of the source array.
Include
optional; BooleanA Boolean (
True
orFalse
) value. IfTrue
(the default value), Filter includes all matching values in the returned array; ifFalse
, Filter excludes all matching values (or, to put it another way, includes all nonmatching values).Compare
optional;CompareMethod
enumerationA constant whose value can be
CompareMethod.Text
orCompareMethod.Binary
(the default).
Return Value
A 0-based String array of the elements filtered from
Source
Description
The Filter function produces an array of
matching values from an array of source values that either match or
do not match a given filter string. Put another way, individual
elements are copied from a source array to a target array if they
either match (Include
is
True
) or do not match
(Include
is False
) a
filter string.A match occurs for an
array element if Match
is a substring of
the array element.
Get VB.NET Language Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.