Skip to content

Instantly share code, notes, and snippets.

@nordinrahman
Created February 24, 2014 06:45
Show Gist options
  • Save nordinrahman/9183019 to your computer and use it in GitHub Desktop.
Save nordinrahman/9183019 to your computer and use it in GitHub Desktop.
Determine if specify query string key exist in specified query string
' -----------------------------------------
' Determine if specify query string key exist in specified query string
' -----------------------------------------
Function HasParamQ(key, queryString)
dim result
result = False
dim kvs
kvs = Split(queryString, "&", -1, 1)
For Each kv in kvs
dim equalSignPos
equalSignPos = InStr(1, kv, "=", 1)
If equalSignPos > 0 Then
dim keyName
keyName = Left(kv, equalSignPos - 1)
If StrComp(key, keyName, 1) = 0 Then
result = True
Exit For
End If
End If
Next
HasParamQ = result
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment