v2025.6.2
All Bundles

Url

URL parser, encoder and decoder

Operations

Compare

Compares two objects

method : public : Compare(rhs:System.Compare) ~ Int

Parameters

NameTypeDescription
rhsComparecompare object

Return

TypeDescription
Int0 if equal, -1 if right-hand side i greater, 1 if left-hand side is greater

Decode

General decoding for HTML or XML strings

function : native : Decode(str:String) ~ String

Parameters

NameTypeDescription
strStringencoded string

Return

TypeDescription
Stringdecoded string

Encode

General encoding for HTML or XML strings

function : 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
Intport, -1 if not present

GetQuery

Gets scheme

method : public : GetQuery() ~ String

Return

TypeDescription
Stringscheme, Nil if not present

GetQueryParameters

Gets the name/value query parameters

method : public : GetQueryParameters() ~ Map<String,String>

Return

TypeDescription
Map<String,String>query parameters, Nil if URL cannot be parsed

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

HashID

Returns a hash ID for the given class

method : public : HashID() ~ Int

Return

TypeDescription
Inthash ID

New

Parsed URL into components

New(url:String)

Parameters

NameTypeDescription
urlStringraw 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