Method
EncodeURLComponent
Description
Encodes the unsafe characters of a URL.
Usage
result = EncodeURLComponent(str)
Part |
Type |
Description |
---|---|---|
result |
The encoded string. |
|
str |
The string to be encoded. |
Notes
A valid URL consists of alphanumerics, special characters and some reserved characters. Use EncodeURLComponent to convert any unsafe characters so they can be properly used in a URL.
The reverse operation is done by DecodeURLComponent.
Sample code
Here is an example of how an embedded component separator is encoded.
Var s As String
s = EncodeURLComponent("www.bob&jane.com")
' s is "www.bob%26jane.com"
Compatibility
All project types on all supported operating systems.