Skip to main content

Name

curl.escape — URL encode a string

Synopsis

require('curl');

curl.escape(str);

str: string

Description

URL encode a string; useful when building an URL.

print(curl.escape("abcd$%^&*()"))

“curl.escape example” outputs the following:

abcd%24%25%5E%26%2A%28%29

See Also

Was this page helpful?