_ListValueInListColumn

Tests if a value is in the stack

Lists.au3
_ListValueInListColumn( $aList [, $vValue = 0 [,$nColumn [, $bCaseSensitive = False ]]] )

parameters

$aList List array as handle
$vValue Value to test
$nColumn Column number when 2D list
$bCaseSensitive True = case sensitive for strings, False = case insensitive

return value

integer value > -1 position in list, -1 = not in list or not a list

related

_ListGetColumn, _ListGet, _ListValueInList

example

Local $aCats = _ListCreate(2) ; 2 columns list
_ListAdd( $aCats, "siamese", "red" ) ; add red siamese cat
_ListAdd( $aCats, "balinese", "white" ) ; add white balinese cat
_ListValueInList( $aCats, "siamese" ) ; returns 0 as "siamese" is in first row
_ListValueInList( $aCats, "white" ) ; returns 1 as "white" is in second row
_ListValueInListColumn( $aCats, 0, "white" ) ; returns -1 as "white" isn't in column 0, the first column