-
Notifications
You must be signed in to change notification settings - Fork 9
/
modAnalysisCache.bas
40 lines (31 loc) · 1.18 KB
/
modAnalysisCache.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Attribute VB_Name = "modAnalysisCache"
Option Explicit
Public Function GetCacheControl(ByRef sInput As String) As String
GetCacheControl = GetHeaderValue(sInput, "Cache-Control")
End Function
Public Function GetPragma(ByRef sInput As String) As String
GetPragma = GetHeaderValue(sInput, "Pragma")
End Function
Public Function GetVaryOrder(ByRef sInput As String) As String
GetVaryOrder = Replace(GetHeaderValue(sInput, "Vary"), ", ", ",", , , vbBinaryCompare)
End Function
Public Function GetVaryCapitalized(ByRef sInput As String) As String
Dim sVaryElements As String
sVaryElements = GetVaryOrder(sInput)
If (LenB(sVaryElements)) Then
If (sVaryElements = LCase$(sVaryElements)) Then
GetVaryCapitalized = 0
Else
GetVaryCapitalized = 1
End If
End If
End Function
Public Function GetVaryDelimiter(ByRef sInput As String) As String
Dim sVaryEntries As String
sVaryEntries = GetVaryOrder(sInput)
If (InStrB(1, sVaryEntries, ", ", vbBinaryCompare)) Then
GetVaryDelimiter = ", "
ElseIf (InStrB(1, sVaryEntries, ",", vbBinaryCompare)) Then
GetVaryDelimiter = ","
End If
End Function