Contents | Prev | Next

7.2.72 The urldecode function

Description

The urldecode function returns a string formed by decoding the URL encoded string passed as it's 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.

Parameter

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

Example

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

Portability

Operating Systems: All
Standard Pascal: No

Contents | Prev | Next