Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,17 @@
sub encode_url$(s$, exclusions$, spaceplus)
local res$, i, ch$
for i=1 to len(s$)
ch$ = mid$(s$, i, 1)
if ch$ = " " and spaceplus then
ch$ = "+"
elsif not instr(esclusions$, ch$) and (ch$ < "0" or (ch$ > "9" and ch$ < "A") or (ch$ > "Z" and ch$ < "a") or ch$ > "z") then
res$ = res$ + "%"
ch$ = upper$(hex$(asc(ch$)))
end if
res$ = res$ + ch$
next i
return res$
end sub
print encode_url$("http://foo bar/")