Is there any common function (in apache commons or similar) to make maps from query-parameter-like strings?
To specific:
Variant a (Querystring)
s="a=1&b=3"
=> Utils.mapFunction(s, '&', '=')
=> (Hash)Map { a:1; b:3 }
Variant b (Cachecontrol-Header)
s="max-age=3600;must-revalidate"
=> Utils.mapFunction(s, ';', '=')
=> (Hash)Map { max-age:3600; must-revalidate:true }
I don't want to reinvent the wheel.
Thanks