Handbook
Glossary
url-append-path ( path1 path2 -- path )
Furnace framework
»
URL objects
»
URL implementation utilities
Prev:
secure-protocol? ( protocol -- ? )
Vocabulary
urls
Inputs
path1
a
string
path2
a
string
Outputs
path
a
string
Word description
Like
append-path
, but intended for use with URL paths and not filesystem paths.
Definition
USING:
combinators
kernel
sequences
splitting
urls.private
;
IN:
urls
:
url-append-path
( path1 path2 -- path )
{
{
[
dup
"/"
head?
]
[
nip
]
}
{
[
dup
empty?
]
[
drop
]
}
{
[
over
"/"
tail?
]
[
append
]
}
{
[
over
"/"
subseq-index
not
]
[
nip
]
}
[
[
"/"
split1-last
drop
"/"
]
dip
3append
]
}
cond
remove-dot-segments
;