/usr/lib/s9fes/help/split-url is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | S9 LIB (split-url string) ==> list
(url-anchor list) ==> string
(url-args list) ==> alist
(url-host list) ==> string
(url-path list) ==> string
(url-proto list) ==> string
(url-suffix list) ==> string
(load-from-library "split-url.scm")
Extract the individual parts of an URL string and store them
in separate elements of the resulting list. The list has the
general form
(protocol host path suffix arguments anchor)
Parts that could not be extracted are set to #F.
PROTOCOL is the protocol without the :// part, e.g.: "http"
HOST is the host name part of the path (if a protocol is given).
PATH is the local path including the file suffix, e.g.: "foo/bar.html"
SUFFIX is an extra copy of the file suffix, e.g.: "html"
ARGUMENTS is a list of key/value pairs as typically received
in the '?' part of an URL, e.g.: ("page" . "1")
ANCHOR is an anchor without the '#' character.
The URL-PROTO, URL-HOST, URL-PATH, URL-SUFFIX, URL-ARGS, and
URL-ANCHOR procedures extract the individual parts of the
resulting list.
(split-url "ftp://example.org/foo.bar?a=1&b=2")
==> ("ftp"
"example.org"
"/foo.bar"
"bar"
(("a" . "1")
("b" . "2"))
#f)
|