Filter

Produce an array by filtering an existing array.

Syntax 
      Filter (SourceArray, FilterString [,Switch [,Compare]])

Key
   SourceArray  An array to be filtered

   FilterString A string of characters to find in SourceArray

   Switch       If True include items that match FilterString
                If False include items that don’t match FilterString

   Compare      vbBinaryCompare (0), vbTextCompare (1)

Examples

arrDemo=Filter(vaVolcanoes, "Cinder cone")
WScript.Echo arrDemo(0)

“To be without some of the things you want is an indispensable part of happiness” ~ Bertrand Russell

Related VBScript commands

Array - Add values to an Array variable.
Equivalent in PowerShell: Hash Tables


 
Copyright © 1999-2024 SS64.com
Some rights reserved