Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
21
Task/URL-encoding/EasyLang/url-encoding.easy
Normal file
21
Task/URL-encoding/EasyLang/url-encoding.easy
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
func$ tohex h .
|
||||
for c in [ h div 16 h mod 16 ]
|
||||
c += 48
|
||||
if c >= 58 : c += 7
|
||||
r$ &= strchar c
|
||||
.
|
||||
return r$
|
||||
.
|
||||
func$ urlenc s$ .
|
||||
for c$ in strchars s$
|
||||
c = strcode c$
|
||||
if c >= 48 and c <= 57 or c >= 65 and c <= 90 or c >= 97 and c <= 122
|
||||
#
|
||||
else
|
||||
c$ = "%" & tohex c
|
||||
.
|
||||
r$ &= c$
|
||||
.
|
||||
return r$
|
||||
.
|
||||
print urlenc "http://foo bar/"
|
||||
Loading…
Add table
Add a link
Reference in a new issue