Jump to content

URL decoding: Difference between revisions

added langur language example
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
(added langur language example)
Line 909:
 
</syntaxhighlight>
 
 
=={{header|langur}}==
This example code works with Unicode, not just ASCII.
<syntaxhighlight lang="langur">val .finish = f(.s) b2s map f toNumber(.x, 16), rest split "%", .s
val .decode = f(.s) replace .s, re/(%[0-9A-Fa-f]{2})+/, .finish
 
writeln .decode("http%3A%2F%2Ffoo%20bar%2F")
writeln .decode("google.com/search?q=%60Abdu%27l-Bah%C3%A1")
</syntaxhighlight>
 
{{out}}
<pre>http://foo bar/
google.com/search?q=`Abdu'l-Bahá
</pre>
 
 
=={{header|Lasso}}==
1,007

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.