mapValuesString


Description:

public static HashMap<string,string> mapValuesString (HashMap<string,string> map, owned MapFunc<string,string> fn)

Returns a new map with all values transformed by the function. Keys are preserved.

Example:

    var map = new HashMap<string, string> (GLib.str_hash, GLib.str_equal);
map.put ("name", "alice");
var upper = Maps.mapValuesString (map, (v) => { return v.up (); });
// upper["name"] == "ALICE"

Parameters:

map

the source map.

fn

the value transformation function.

Returns:

a new HashMap with transformed values.