No matching definitions.

tur/httpd-string

stdlib/httpd-string.tur

optional owned-String accessors for stdlib/httpd.

Since: v2 (string-owned-builders-and-optional-accessors-plan, Part 2)

defn

httpd-req-form-raw

(httpd-req-form-raw [conn ptr<void> field : cstr] :)

internal: decoded form value as a fresh cstr, or NULL.

defn

httpd-req-form-opt

(httpd-req-form-opt [conn ptr<void> field : cstr] :)

look up a URL-encoded form field as an optional String.

connconnection handle from the worker
fieldform field name (case-sensitive, plain ASCII)

(Option String) -- some decoded owned value on a match, none on any miss.

(let [o (httpd-req-form-opt c "username")]
    (if (some? o) (string/to-cstr (unwrap o)) "<anonymous>"))

Since: v2

defn

cstr-null?

(cstr-null? [s : cstr] :)

internal: true iff the cstr pointer is NULL (a miss sentinel).