From cf16af637374c5bcfe2f833fdc8839d6a632ed1f Mon Sep 17 00:00:00 2001 From: visionmercer <62051836+visionmercer@users.noreply.github.com> Date: Sat, 21 May 2022 08:20:05 +0200 Subject: [PATCH] Create urldecode.bm --- urldecode.bm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 urldecode.bm diff --git a/urldecode.bm b/urldecode.bm new file mode 100644 index 0000000..401224e --- /dev/null +++ b/urldecode.bm @@ -0,0 +1,16 @@ +Function urldecode$ (strng As String) + Dim Tmpstr As String + Do Until count >= Len(strng) + count = count + 1 + Select Case Mid$(strng, count, 1) + Case "%" + Tmpstr = Tmpstr + Chr$(Val("&H" + Mid$(strng, count + 1, 2))) + count = count + 2 + Case "+" + Tmpstr = Tmpstr + " " + Case Else + Tmpstr = Tmpstr + Mid$(strng, count, 1) + End Select + Loop + urldecode = Tmpstr +End Function