Hi,
Converting some characters to others is very easy with StringBuilder,
and doesn't require converting to a string first.
<<
True.
The question asked about searching for a ESC character. This character
often is used as a delimiter in a packetized data stream. The most common
use of ESC characters (that I have encountered) is the escape sequences uses
by various terminal emulations. These must be extracted by very complex
state machines -- these employ pattern matching, but also much more.
Character replacement will not be an issue, but discovery of substrings
will be (an action will be taken on a subsequent substring, until the next
ESC sequence is encountered, which then alters the current state).
However, I don't believe this question is really about that parsing at
all - it's an interop problem of getting the right data into the
StringBuilder in the first place.
<<
Perhaps parsing isn't involved. However, that was my first reaction.
Interpreting these questions often involves its own form of parsing, with
less than complete information.
Dick
--
Richard Grier (Microsoft Visual Basic MVP)
See
www.hardandsoftware.net for contact information.
Author of Visual Basic Programmer's Guide to Serial Communications, 3rd
Edition ISBN 1-890422-27-4 (391 pages) published February 2002.