URL decoding: Difference between revisions
Content deleted Content added
PascalABC.NET |
Langurmonkey (talk | contribs) |
||
Line 944: | Line 944: | ||
=={{header|langur}}== |
=={{header|langur}}== |
||
<syntaxhighlight lang="langur"> |
<syntaxhighlight lang="langur"> |
||
val |
val finish = fn s:b2s(map(fn x:number(x, 16), rest(split("%", s)))) |
||
val decode = fn s:replace(s, re/(%[0-9A-Fa-f]{2})+/, finish) |
|||
writeln |
writeln decode("http%3A%2F%2Ffoo%20bar%2F") |
||
writeln |
writeln decode("google.com/search?q=%60Abdu%27l-Bah%C3%A1") |
||
</syntaxhighlight> |
</syntaxhighlight> |
||