The urldecode function


The urldecode function returns a string formed by decoding the URL encoded string passed as its parameter. URL decoding is a simple two step process. First all plus characters ('+') are converted to spaces (' '). Second all hexadecimal sequences like '%xx' are converted to the equivalent binary character.

This function can be useful in Common Gateway Interface (CGI) programs for processing GET or POST methods, since these methods URL encode strings.


The urldecode function's only parameter is an expression of string type or char type.


   urldecode('irie+pascal')           returns   'irie pascal'
   urldecode('%2Fusr%2Flocal%2Fbin')  returns  '/usr/local/bin'


Operating Systems: All
Standard Pascal: No