Url
URL parser, encoder and decoder
Operations
- New
- Compare
- Decode
- Encode
- GetFragment
- GetHost
- GetPath
- GetPort
- GetQuery
- GetQueryParameters
- GetScheme
- GetUrl
- HashID
- Parsed
- ToString
Compare
Compares two objects
method : public : Compare(rhs:System.Compare) ~ Int
Parameters
Name | Type | Description |
---|---|---|
rhs | Compare | compare object |
Return
Type | Description |
---|---|
Int | 0 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
Name | Type | Description |
---|---|---|
str | String | encoded string |
Return
Type | Description |
---|---|
String | decoded string |
Encode
General encoding for HTML or XML strings
function : native : Encode(str:String) ~ String
Parameters
Name | Type | Description |
---|---|---|
str | String | string to encode |
Return
Type | Description |
---|---|
String | encoded string |
GetFragment
Gets fragment
method : public : GetFragment() ~ String
Return
Type | Description |
---|---|
String | fragment, Nil if not present |
GetHost
Gets host
method : public : GetHost() ~ String
Return
Type | Description |
---|---|
String | host, Nil if not present |
GetPath
Gets path
method : public : GetPath() ~ String
Return
Type | Description |
---|---|
String | path, Nil if not present |
GetQuery
Gets scheme
method : public : GetQuery() ~ String
Return
Type | Description |
---|---|
String | scheme, Nil if not present |
GetQueryParameters
Gets the name/value query parameters
method : public : GetQueryParameters() ~ Map<String,String>
Return
Type | Description |
---|---|
Map<String,String> | query parameters, Nil if URL cannot be parsed |
GetScheme
Gets scheme
method : public : GetScheme() ~ String
Return
Type | Description |
---|---|
String | scheme, Nil if not present |
HashID
Returns a hash ID for the given class
method : public : HashID() ~ Int
Return
Type | Description |
---|---|
Int | hash ID |
Parsed
Determines if given URL has been parsed correctly
method : public : Parsed() ~ Bool
Return
Type | Description |
---|---|
Bool | true if parsed, false otherwise |
ToString
String representation of URL
method : public : ToString() ~ String
Return
Type | Description |
---|---|
String | string representation of URL |