Created
February 24, 2014 06:45
-
-
Save nordinrahman/9183019 to your computer and use it in GitHub Desktop.
Determine if specify query string key exist in specified query string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' ----------------------------------------- | |
' 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