Skip to content
MapRemoveFirst

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)
        MapSetOnlyR(&map, 2, 20);
    
        bool result = MapRemoveFirst(&map, 1);
        result      = result && MapContainsKey(&map, 1);
        result      = result && (MapValueCountForKey(&map, 1) == 1);
        }
    
        MapRemoveFirst(&map, 5);
        MapSetOnlyR(&map, 105, 205);
        MapInsertR(&first, 1, 11);
        MapInsertR(&first, 2, 20);
        MapRemoveFirst(&first, 1);
    
        MapInsertR(&second, 9, 90);
Last updated on