I'm not finding the answer to this question, simply what I want to know is to remove empty positions from an array, for example:
var(0) = "Remover"
var(1) = ""
var(2) = "espaços"
var(3) = ""
var(4) = "em"
var(5) = ""
var(6) = "branco"
I want to remove the empty positions, which in this case would be var (1), var (3) and var (5),
Would anyone know how to do this?
I was thinking of passing only non-empty fields to another array, but how could I do that?
I tried to do the following command:
Dim teste() As String
Dim i1 As Integer = 1
Dim i2 As Integer = 0
Dim testesemespaco(500) As String
teste = html.Split()
While i1 < teste.Length
If teste(i1) <> "" Then
testesemespaco(i2) = teste(i1)
i2 = i2 + 1
End If
i1 = i1 + 1
End While