O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

getScheme — Return the scheme extracted from a URL

Usage

URL.getScheme(url)

url : String

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required