Version: v0.7.0 - Beta.  We welcome contributors & feedback.

String.encodeUrl

encodeUrl() -> string

Description

Encode with percent-escapes (RFC 3986).

$query = '1/3 + 50%'
$search = '/search?q=' ~ $query.encodeUrl()
//= '/search?q=1%2F3%20%2B%2050%25'

See Also