Ruby URI.decode

Unescapes/Decodes the string.

Function

URI.decode ( str )

Alias Function

URI.unescape ( *args )

Parameters

str - String to decode.

Return value

Returns unescaped/decoded version of str

Example

require 'uri'

url = URI.decode("http%3A%2F%2Fexample.com%2F%3Fa%3Druby%20uri%20decode")
puts url

Output

http://example.com/?a=ruby uri decode

Github

See also: