_MapValueInMap

Tests if a key is in the key map

Lists.au3
_MapValueInMap( $aMap [, $vValue = 0 [, $bCaseSensitive = False ]] )

parameters

$aMap Key map array as handle
$vValue Value to test
$bCaseSensitive True = case sensitive for strings, False = case insensitive

return value

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

related

_MapAdd, _MapValueByKey, _MapKeyByValue, _MapRemoveByKey, _MapRemoveByValue, _MapGetKey, _MapGetValue, _MapKeyInMap

example

Local $aAddress = _MapCreate()
_MapAdd( $aAddress, "street", "Scary avenue" )
_MapAdd( $aAddress, "town", "Ghost town" )
_MapAdd( $aAddress, "state", "Night state" )
....
If _MapValueInMap( $aAddress, "Scary avenue" ) > -1 Then _MapRemoveByValue( $aAddress, "Scary avenue" )