parse-host ( string -- host/f port/f )
Furnace framework » URL objects » URL implementation utilities

Next:secure-protocol? ( protocol -- ? )


Vocabulary
urls

Inputs
stringa string


Outputs
host/fa string or f
port/fan integer or f


Word description
Splits a string of the form host:port into a host and a port number. If the port number is not specified, outputs f.

Notes
This word is used by >url. It can also be used directly to parse host:port strings which are not full URLs.

Examples
USING: arrays kernel prettyprint urls ; "sbcl.org:80" parse-host 2array .
{ "sbcl.org" 80 }


Definition