Home

Url

URL parser, encoder and decoder

Operations

New

Parsed URL into components

New(url:String)
Parameters
NameTypeDescription
urlStringraw URL

Decode

General decoding for HTML or XML strings

function : public : native : Decode(str:String) ~ String
Parameters
NameTypeDescription
strStringencoded string

Return
TypeDescription
Stringdecoded string

Encode

General encoding for HTML or XML strings

function : public : native : Encode(str:String) ~ String
Parameters
NameTypeDescription
strStringstring to encode

Return
TypeDescription
Stringencoded string

GetFragment

Gets fragment

method : public : GetFragment() ~ String
Return
TypeDescription
Stringfragment, Nil if not present

GetHost

Gets host

method : public : GetHost() ~ String
Return
TypeDescription
Stringhost, Nil if not present

GetPath

Gets path

method : public : GetPath() ~ String
Return
TypeDescription
Stringpath, Nil if not present

GetPort

Gets port

method : public : GetPort() ~ Int
Return
TypeDescription
Intpor, -1 if not present

GetQuery

Gets scheme

method : public : GetQuery() ~ String
Return
TypeDescription
Stringscheme, Nil if not present

GetScheme

Gets scheme

method : public : GetScheme() ~ String
Return
TypeDescription
Stringscheme, Nil if not present

GetUrl

Gets original URL

method : public : GetUrl() ~ String
Return
TypeDescription
Stringoriginal URL

Parsed

Determines if given URL has been parsed correctly

method : public : Parsed() ~ Bool
Return
TypeDescription
Booltrue if parsed, false otherwise

ToString

String representation of URL

method : public : ToString() ~ String
Return
TypeDescription
Stringstring representation of URL