Skip to content
MapFindNextForKey

MapFindNextForKey

Description

Advance a per-key cursor to the next value for the same key.

Parameters

Name Direction Description
m in Map.
lookup_key in Key being queried.
cursor in Current cursor returned by MapFindFirstForKey or a previous MapFindNextForKey call.

Success

Returns a MapValueCursor positioned at the next entry for lookup_key (in iteration order). The map is not modified.

Failure

Returns MapValueCursorInvalid() when no more entries match. The map is not modified.

Usage example (Cross-references)

Usage examples (Cross-references)
            value_sum += *value_ptr;
            seen      += 1;
            cursor     = MapFindNextForKey(&map, 4, cursor);
        }
        MapValueCursor single = MapFindFirstForKey(&map, 9);
        result                = result && MapValueCursorIsValid(single);
        MapValueCursor past   = MapFindNextForKey(&map, 9, single);
        result                = result && !MapValueCursorIsValid(past);
        result                = result && !MapValueCursorIsValid(MapFindNextForKey(&map, 9, past));
        MapValueCursor past   = MapFindNextForKey(&map, 9, single);
        result                = result && !MapValueCursorIsValid(past);
        result                = result && !MapValueCursorIsValid(MapFindNextForKey(&map, 9, past));
    
        MapDeinit(&map);
Last updated on