You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
12 lines
234 B
Python
12 lines
234 B
Python
|
|
def urldecode(s):
|
||
|
|
result = ""
|
||
|
|
i = 0
|
||
|
|
while i < len(s):
|
||
|
|
if s[i] == '%':
|
||
|
|
result += chr(int(s[i+1:i+3], 16))
|
||
|
|
i += 3
|
||
|
|
else:
|
||
|
|
result += s[i]
|
||
|
|
i += 1
|
||
|
|
return result
|