TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Telco Joe
NA
7
2.4k
Trouble Parsing with Indexof
Nov 17 2010 3:45 PM
I am trying to use indexof to parse serial data and extract data between @ and #.
int start = data.IndexOf('@') + 1;
int end = data.IndexOf('#', start);
string result = data.substring (start, end - start -1)
but sometimes the string does not stop at # and I get extra data. What is a good way to effectively filter out everything outside of the @ and #.
Note: If the data being processed is from a pre-existing string, then it works fine. The problem is when the data comes in from a serial port (stream)
Reply
Answers (
8
)
Printing - Migrating from VB6 to C#
About image converting...