Dim Str As String = "30363738354244432030303030303032"
Dim isSpace As Boolean = False
Dim finalStr As String = ""
For i As Integer = 1 To Str.Length
If i Mod 8 = 0 Then
If isSpace Then
finalStr += vbCrLf
isSpace = False
Continue For
Else
finalStr += " "
isSpace = True
Continue For
End If
Else
finalStr += Mid(Str, i, 1)
End If
Next
MsgBox(finalStr)
Dim Str As String = "30363738354244432030303030303032"
Dim isSpace As Boolean = False
Dim finalStr As String = ""
For i As Integer = 1 To Str.Length
If i Mod 8 = 0 Then
If isSpace Then
finalStr += vbCrLf
isSpace = False
Continue For
Else
finalStr += " "
isSpace = True
Continue For
End If
Else
if Mid(Str, i, 1)=" "
finalStr += "0"
Else
finalstr+ = Mid(Str, i, 1)
End If
Next
MsgBox(finalStr)

Dim Str As String = Label1.Text
Dim isSpace As Boolean = False
Dim finalStr As String = ""
For i As Integer = 1 To Str.Length
If i Mod 8 = 0 Then
If isSpace Then
finalStr += vbCrLf
isSpace = False
Continue For
Else
finalStr += " "
isSpace = True
Continue For
End If
Else
If Mid(Str, i, 1) = " " Then
finalStr += "0"
Else
finalStr += Mid(Str, i, 1)
End If
End If
Next
MsgBox(finalStr)

Dim Str As String = "30363738354244432030303030303032"
Dim isSpace As Boolean = False
Dim finalStr As String = ""
For i As Integer = 1 To Str.Length
If i Mod 8 = 0 Then
If isSpace Then
finalStr += vbCrLf
isSpace = False
Continue For
Else
finalStr += " "
isSpace = True
Continue For
End If
Else
finalStr += Mid(Str, i, 1)
End If
Next
MsgBox(finalStr)