Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
|
|
@ -1,5 +1,5 @@
|
|||
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
|
||||
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 .decode("http%3A%2F%2Ffoo%20bar%2F")
|
||||
writeln .decode("google.com/search?q=%60Abdu%27l-Bah%C3%A1")
|
||||
writeln decode("http%3A%2F%2Ffoo%20bar%2F")
|
||||
writeln decode("google.com/search?q=%60Abdu%27l-Bah%C3%A1")
|
||||
|
|
|
|||
9
Task/URL-decoding/PascalABC.NET/url-decoding.pas
Normal file
9
Task/URL-decoding/PascalABC.NET/url-decoding.pas
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses System;
|
||||
|
||||
function URLDecode(s: string) := Uri.UnescapeDataString(s);
|
||||
|
||||
begin
|
||||
Println(URLDecode('http%3A%2F%2Ffoo%20bar%2F'));
|
||||
Println(URLDecode('google.com/search?q=%60Abdu%27l-Bah%C3%A1'));
|
||||
Println(URLDecode('%25%32%35'));
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue