Tests if a value is in the stack
Lists.au3 _ListValueInListColumn( $aList [, $vValue = 0 [,$nColumn [, $bCaseSensitive = False ]]] ) |
$aList | List array as handle |
$vValue | Value to test |
$nColumn | Column number when 2D list |
$bCaseSensitive | True = case sensitive for strings, False = case insensitive |
integer value | > -1 position in list, -1 = not in list or not a list |
_ListGetColumn, _ListGet, _ListValueInList
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 |