URL

Converts string to URL

Description

Converts the given string to an URL-type string. Returns null if the string cannot be converted to an URL.

Function signature

URL(string: String) => String

Parameter

Description

String

String to convert

Examples

Formula

Return value

URL("http://foo.com/blah_blah")

http://foo.com/blah_blah

URL("https://www.example.com/foo/?bar=baz&inga=42&quux")

https://www.example.com/foo/?bar=baz&inga=42&quux

URL("http://userid@www.example.com/")

http://userid@www.example.com/

URL("http://142.42.1.1:8080/")

http://142.42.1.1:8080/