EncodeURLComponent Function

Encodes the components of a URL.

Syntax
result = EncodeURLComponent( str )

Parameters
str | String | The string to be encoded.

Return Value
Result | String | The encoded string.

# Notes

A valid URL is a series of components that are separated by component separators. They are the ".", "/", ";", "&", and "?". EncodeURLComponent works with each component part of the URL. It assumes that any component separators in a component represent text and must be encoded. The reverse operation is done by DecodeURLComponent.

# Example

Here is an example of how an embedded component separator is encoded.

Dim s as String
s=EncodeURLComponent("www.Bob&Ray.com") //returns "www.bob%26ray.com"

# See Also

DecodeURLComponent.