How to replace Tab characters?
Esteemed Forum Members and Lurkers:
How do I remove Tab characters out of a string?
I have strings read from a tab delimited file, and I need to trim and split them.
The following works elsewhere, but NOT in VB.Net.
Dim tempstr As String
' Simulate my string from the file - Chr(9) is a Tab
tempstr = "336" & Chr(9) & "G1"
Replace(tempstr, Chr(9), " ")
MsgBox(Asc(Mid(tempstr, 1, 1))) ' 51 - 3
MsgBox(Asc(Mid(tempstr, 2, 1))) ' 51 - 3
MsgBox(Asc(Mid(tempstr, 3, 1))) ' 54 - 6
MsgBox(Asc(Mid(tempstr, 4, 1))) ' 9 Tab - Should be space!
MsgBox(Asc(Mid(tempstr, 5, 1))) ' 84 - G
MsgBox(Asc(Mid(tempstr, 6, 1))) ' 49 - 1
Any comments, suggestions, or assistance would be greatly appreciated.