URLEncodedFormat
Generates a URL-encoded string.
For example, it replaces spaces with %20, and non-alphanumeric characters with equivalent hexadecimal escape sequences. Passes arbitrary strings within a URL. *
Method Signature
URLEncodedFormat(string=[any])
Arguments
Argument
Type
Required
Description
Default
string
any
true
Examples
Simple urlEncodedFormat Example
It returns url encoded string.
writeOutput( URLEncodedFormat( "This is a string with special character." ) );
Result: This%20is%20string%20with%20special%20character%2E
Additional Examples
url_string = "https://dev.boxlang.org/t/welcome-to-boxlang-dev/2064";
dump( URLEncodedFormat( url_string ) );
// https%3A%2F%2Fdev%2Eboxlang%2Eorg%2Ft%2Fwelcome%2Dto%2Dboxlang%2Ddev%2F2064
Related
Last updated
Was this helpful?