The box represents a non-ascii character in the string, probably a line feed
or carriage-return. Use StrData.Length to confirm that the string is
actually one character longer than the ASCII characters you can see. If it
is consistently one character longer than it should be then use the
substring method to extract everything except the last character.
STRdata = STRdata.substring(0, STRData.length - 1)
Depending on the contents of the string, you might be able to use
STRdata = STRdata.TrimEnd(Nothing)
"cmdolcet69" <co************@hotmail.comwrote in message
news:f6**********************************@y38g2000 hsy.googlegroups.com...
On Aug 26, 4:53 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.atwrote:
>"cmdolcet69" <colin_dolce...@hotmail.comschrieb:
>I am using the following to gwt the return value from the serial port
"mabtRxBuf"
I declare my STRdata as a global string and when the code is executed
I get the following for the STRdata
STRdata = "0.10[]" how can i get rid of the [] in my string?
Dim enc As New System.Text.ASCIIEncoding
STRdata = enc.GetString(mabtRxBuf)
Does the string really end with the characters "[]" or is the last
character
displayed as a rectangle glyph? If the latter is the case, what's the
character code of the last character? You could use
'String.Left'/'String.Substring' to extract a part of the string.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
You are correct it is the last character displayed in the "" how can I
get ride of any character [] in my string