urlencode(string)

Encode a string using the RFC3896 URL encoding method where unsafe characters are replaced with their equivalent lowercase %xx hexadecimal value and spaces are replaced with the + character. The only characters not encoded are defined by this set [a-zA-Z0-9] and the four characters '_', '.', '-', and '~'.

Example

str = urlencode("what do you mean?")