Icon EncodeURLComponent

Unit: WebCore

Available In: Client and Server Applications

function EncodeURLComponent(const Component: String): String

The EncodeURLComponent function returns the encoded version of the URL component input parameter. A URL component is any portion of a URL within a path delimiter (/), query delimiter (?), or parameter delimiter (&). All characters are encoded except for the following:

A-Z a-z 0-9 - _ . ! ~ * ' ( )

The return value is a UTF-8-encoded String value containing percent-encoded hex strings for any encoded characters.

This function is the analog of the DecodeURLComponent function.

Examples

X := EncodeURLComponent('Jones & Smith');  // X is 'Jones%20%26%20Smith'
Image