vb.net reversing string for every two characters

0

The default string is "0x0AC2153C 0x0000553C 0x00000000 0x00000000"
I can get the string 0AC2153C 553C using my code.
But i need the string to reverse it 3C15C20A 3C55 and the output should be like this 3C15C20A3C55

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim dd As String = "0x0AC2153C 0x0000553C 0x00000000 0x00000000"
    Dim sp() As String
    Dim tmp As String = ""
    Dim strings As New List(Of String)
    If dd.Contains("x") Then
        sp = dd.Split(" ")
        For count = 0 To sp.Length - 1
            If count = 0 Then
                tmp = sp(count).Remove(0, 2)
                'For i As Integer = 0 To tmp.Length - 1 Step 2
                'strings.Add(tmp.Substring(i, 2))
                'Next
            ElseIf count = 1 Then
                tmp += sp(count).Remove(0, 6)
            End If
        Next
    End If
    MsgBox(tmp)
End Sub
vb.net
asked on Stack Overflow Nov 9, 2020 by Julius Malundras • edited Nov 9, 2020 by Julius Malundras

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0