Name
getScheme — Return the scheme extracted from a URL
Usage
URL.getScheme(url)
: Stringurl
Description
Returns the scheme part of url
. This
function supports relative and absolute URLs. Returns the empty
string if the URL doesn’t specify a scheme.
Returns invalid if url
can’t be
converted to a string or can’t be parsed as a URL.
Examples
URL.getScheme("http://www.inhand.net/")
returns string "http"
URL.getScheme("../logo.wbmp")
returns string ""
URL.getScheme("http://www.inhand.net:xxx/")
returns invalid
URL.getScheme(invalid)
returns invalid
Get Learning WML, and WMLScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.