MapRemoveFirst
MapRemoveFirst
Description
Remove and destroy the first entry matching a key.
Parameters
| Name | Direction | Description |
|---|---|---|
m |
in,out | Map. |
key |
in | Key to remove. |
Success
true if a value for the key existed and was removed.
Failure
false
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Map.Remove.c:28:
MapSetOnlyR(&map, 2, 20);
bool result = MapRemoveFirst(&map, 1);
result = result && MapContainsKey(&map, 1);
result = result && (MapValueCountForKey(&map, 1) == 1);- In
Map.Remove.c:109:
}
MapRemoveFirst(&map, 5);
MapSetOnlyR(&map, 105, 205);- In
Map.Ops.c:119:
MapInsertR(&first, 1, 11);
MapInsertR(&first, 2, 20);
MapRemoveFirst(&first, 1);
MapInsertR(&second, 9, 90);
Last updated on