Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42215

string.split function

$
0
0
hello sir
i want to split a string , i have hexadecimal string maybe like "00 32 66 A1 00 00 00 00 00 11 FF 00 00 87 AF 4B 00 00 1A B8 00 00 06"
Code:

  Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
     
        Dim a As String = Strings.Replace(TextBox1.Text, " ", String.Empty, 1, -1, CompareMethod.Binary)
        Dim b As String = TextBox1.Text
        Dim strArr() As String
        Dim count As Integer

        strArr = b.Split("00")
        For count = 0 To strArr.Length - 1
            If strArr(count) = "" Then

            Else
                ListBox1.Items.Add(strArr(count))
            End If
        Next
    End Sub

i want values to add in listbox like
32 66 A1
11 FF
87 AF 4B
1A B8
06

but it adds like:-

32 66 A1




11 FF

87 AF 4B

1A B8

06

i dont know why my if statement is not working , what can i do?

Thank you
Binarybot

Viewing all articles
Browse latest Browse all 42215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>