Match

From Visual DialogShell Wiki
Jump to navigation Jump to search
function match($a,$b,$c) {
   if ($c = $null){
       $c = -1
   }
   else {
       $c = $c
   }
   try{$return = $a.FindString($b,$c)}
	catch{$return = $a.Items.IndexOf($b)}
	    return $return
<#
   .SYNOPSIS
   The index of the next match in a list, with an optional start point.
    
   .DESCRIPTION
    VDS
   $match = $(match $listbox1 $string 3)
    
   .LINK
   https://dialogshell.com/vds/help/index.php/match
#>
}