>
>I am working with a serial port object and receive a line feed and carriage return as the ending on each incoming data stream. I would like to strip these off each time before passing the string on. What is the most appropriate method to do this? string.substring(), string.trim(), or something else?>
>There are many ways to skin a cat.
>Here's one:
>
>string txt;
>txt = txt.Replace("\r\n", string.Empty);
>
Ok so if might look like this:
string read = "EVT:TRIGGER Read GPIO 0" + "\r\n"
I want to then strip the line feed and return back off and leave the rest. You are saying this will replace with an empty string on the end of it? That works for me. Thanks, that is pretty clean method to use.
Tim
Timothy Bryan