Missing Parameters?

The following strips html tags from HTML...all of a sudden it says Missing Parameters at "If strB = ">" Then"?~?~ am I missing something?

B4X:
Sub HTML2Text(HTML As String) As String
Dim X As Long
Dim strB As String
Dim String1 As String
Dim Counter As Long
X = 1
strB = Mid(HTML, X, 1)
Do While strB.Length = 1
strB = Mid(HTML, X, 1)
If  = "<" Then Counter = Counter + 1
If Counter = 0 Then String1 = String1 + strB
If strB = ">" Then
 If Counter <> 0 Then 
      Counter = Counter - 1
 End If
End If
X = X + 1
Loop
Return String1
End Sub

Sub Mid(Text As String, Start As Int, Length As Int) As String
   Return text.SubString2(start-1,start+length-1)
End Sub
 
Probably this line:
B4X:
If  = "<" Then Counter = Counter + 1

nope :p actual code is

Sub HTML2Text(HTML As String) As String
Dim X As Long
Dim strB As String
Dim String1 As String
Dim Counter As Long
X = 1
strB = Mid(HTML, X, 1)
Do While strB.Length = 1
strB = Mid(HTML, X, 1)
If strB = "<" Then Counter = Counter + 1
If Counter = 0 Then String1 = String1 + strB
If strB = ">" Then
If Counter <> 0 Then
Counter = Counter - 1
End If
End If
X = X + 1
Loop
Return String1
End Sub

forgot to type the strB when copying over to here... still returns the error....
Compiling code. Error
Error compiling program.
Error description: Missing parameter.
Occurred on line: 122
If strB = ">" Then
Word: >
 
Upvote 0
Top