Hello,
I receive an array of ASCII bytes from asyncstream, the array is 30 bytes long. For example if I receive 'B4R' i get 3 ASCII bytes and 27 nulls. How can i trim these nulls.
Sub AStream_NewData (Buffer() As Byte)
Dim bc As ByteConverter
Dim i As Int = bc.IndexOf(Buffer, Array As Byte(0))
If i > -1 Then
Buffer = bc.SubString2(Buffer, 0, i)
End If
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.