Commit 84e98d8d authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

Improve documentation for std.collect

parent 99efebb3
...@@ -110,16 +110,17 @@ Example ...@@ -110,16 +110,17 @@ Example
$Function VOID collect(HEADER hdr, STRING sep=", ") $Function VOID collect(HEADER hdr, STRING sep=", ")
Description Description
Collapses multiple *hdr* headers into one long header. Collapses multiple *hdr* headers into one long header. The
The header values are joined with a comma (",") unless a default separator *sep* is the standard comma separator to
different separator is specified. use when collapsing headers, with an additional whitespace
for pretty printing.
Care should be taken when collapsing headers. In particular Care should be taken when collapsing headers. In particular
collapsing Set-Cookie will lead to unexpected results on the collapsing Set-Cookie will lead to unexpected results on the
browser side. browser side.
Examples Examples
std.collect(req.http.accept); | std.collect(req.http.accept);
std.collect(req.http.cookie, "; "); | std.collect(req.http.cookie, "; ");
$Function DURATION duration(STRING s, DURATION fallback) $Function DURATION duration(STRING s, DURATION fallback)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment