by CloudASC (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Thu 6th July 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Basic String Parser, It is designed for as a basis for web developers who want to remove crap that Microsoft Word sticks in its converted html
'Extract
Dim a, b, c As Integer
Dim theflag As Boolean
Dim sInput As String, sMod As String, sOutput As String
sInput = Text1.Text
sMod = Text3.Text
a = 1
b = 1
Do While a < (Len(sInput) + 1)
If Mid(sInput, a, 1) = "<" Then
a = a + 1
theflag = True
If Mid(sInput, a, Len(sMod)) = sMod Then
sOutput = sOutput & Mid(sInput, a - 1, 1)
sOutput = sOutput & Mid(sInput, a, Len(sMod))
a = a + Len(sMod)
Do While b < Len(sInput)
If Mid(sInput, b + a, 1) = ">" Then
sOutput = sOutput & Mid(sInput, b + a, 1)
a = a + (b + 1)
Exit Do
Else
b = b + 1
End If
Loop
Else
a = a + 1
End If
Else
sOutput = sOutput & Mid(sInput, a, 1)
a = a + 1
End If
Loop
Text2.Text = sOutput
End Sub
Private Sub Command2_Click()
'Remove
Dim a, b, c As Integer
Dim sInput As String, sMod As String, sOutput As String
sInput = Text1.Text
sMod = Text3.Text
a = 1
Do While a < (Len(sInput) + 1)
If Mid(sInput, a, Len(sMod)) <> sMod Then
sOutput = sOutput & Mid(sInput, a, 1)
a = a + 1
Else
a = a + Len(sMod)
End If
Loop
Text2.Text = sOutput
End Sub
Private Sub Form_Load()
End Sub
No comments have been posted about Basic String Parser, It is designed for as a basis for web developers who want to remove crap that . Why not be the first to post a comment about Basic String Parser, It is designed for as a basis for web developers who want to remove crap that .