Bread a Long string in sub string that have known starting and ending strings.
Posted on 2005-04-03
I am reading text data from a serial port. The long text has several sub data strings. At time the first few characters are not apart of the sub data string. The first part of each sub data string starts with a $ and ends with sum check or *66. I need to remove each of the sub strings and read them into an array.
First problem is that trash data must be removed from the start of the long string and from the end. I do not find a funtion that will remove these trash or remove those characters.
Second I do not know how to remove the four or five sub string that are in the long serial port string. The long string may look like this "12345$WIWMM,5.5,23,A,B,C*$GPRMC,111111.27,A,00000.10878,N,00000.10878,W,5.0,315,0,1*57236789"
Once the Sub string are read I can read the data on the sub string, but I con not know how to remove and read each sub string.
Visual Basic .Net is being used and it does not allow sum VB6 function.