string.URLEncode()

Encodes a string to be URL-safe according to the application/x-www-form-urlencoded MIME format

string.URLEncode( string [, charset [, force ] ] )

Returns: String

Argument Description
string
string, required
charset
string, optional

The World Wide Web Consortium Recommendation states that UTF-8 should be used as per https://www.w3.org/TR/html40/appendix/notes.html#non-ascii-chars.

  • Using different charsets may cause incompatibilities with other systems.
force
boolean, optional

If false, then the string will not be encoded if it does not contain unsafe characters.

Examples

There are currently no examples for this function

See also