Returns a new map with all keys transformed by the function. Values are preserved. If multiple keys map to the same new key, later entries overwrite earlier ones unless conflict resolver is provided.
Example:
var map = new HashMap<string, string> (GLib.str_hash, GLib.str_equal);
map.put ("Name", "Alice");
var lower = Maps.mapKeysString (map, (k) => { return k.down (); });
// lower["name"] == "Alice"
| map |
the source map. |
| fn |
the key transformation function. |
| on_conflict |
optional resolver for key collisions. |
|
a new HashMap with transformed keys. |