url.path
This function returns the path part of URL.
Syntax
url.path(rawURLString)
Arguments
Argument |
Type |
Description |
---|---|---|
rawURLString |
string |
Raw URL string |
Returns
Type |
Description |
---|---|
string |
The path part of the URL |
Examples
The function url.path("https://example.com:8080/root-path/sub-path?query=example+query+%2F+question#fragment")
returns "/root-path/sub-path
".