Hi Scott,
I just ran that piece of code and it worked just like I expected it to. I
tried:
byte[] buffer;
buffer = System.Text.Encoding.Default.GetBytes("hello\r\nho w are you?");
string x = System.Text.Encoding.Default.GetString(buffer);
x = x.Replace("\r\n", "\r");
If you look at the contents of buffer you can see byte 13 and 10, after
replacing byte 10 is not longer there in string x.
Mark.
"sc**********@yahoo.com" wrote:
Given the following:
string x = System.Text.Encoding.Default.GetString(buffer);
x = x.Replace("\r\n", "\r");
If the buffer contains 13 and 10 (2 bytes), can someone please tell me
why the second line cant find and replace? \r\n is supposed to be
equivalent to 13,10 arent they? Im trying to strip out the newline (10)
character.