Weighted
is one entry of a weighted, comma-separated header list such as
Accept, Accept-Encoding or Accept-Language: a lower-cased value — the
media range, content coding or language range — and its quality q between
0.0 and 1.0.
parse-list
(Fn [(Ref String a)] (Array Weighted))
(parse-list s)
parses a weighted, comma-separated header list into its
entries, in header order. Each entry's value is the lower-cased text before
its first ;, and its q is the ;q= parameter, clamped to [0.0, 1.0] and
defaulting to 1.0. Entries with an empty value are skipped.
set-value!
(Fn [(Ref Weighted a), String] ())
sets the value property of a Weighted in place.
update-q
(Fn [Weighted, (Ref (Fn [Double] Double a) b)] Weighted)
updates the q property of a Weighted using a function f.
update-value
(Fn [Weighted, (Ref (Fn [String] String a) b)] Weighted)
updates the value property of a Weighted using a function f.