끝나지 않는 프로그래밍 일기


간단한 프로젝트.

HV6C.zip

Option Explicit

Private Sub Text1_Change()
    Dim headerLine() As String
    Dim dHeader As String, dValue As String
    Dim temp As String
    Dim i As Integer
    
    headerLine = Split(Text1.Text, vbCrLf)
    For i = 0 To UBound(headerLine)
        If InStr(headerLine(i), ":") > 0 Then
            dHeader = Split(headerLine(i), ":", 2)(0)
            dValue = Split(headerLine(i), ":", 2)(1)
        Else
            dHeader = headerLine(i)
            dValue = vbNullString
        End If
        
        temp = temp & Text3.Text & ".SetRequestHeader """ & Trim(dHeader) & """, """ & Trim(dValue) & """" & vbCrLf
    Next i
    
    Text2.Text = temp
End Sub