L
Levidikus
Normally, I never have any problems with String.Replace(). However, I
found that I need to replace multiple instances of the character
"ª" (\xAA) with a # symbol. The input file is a simple one line
file. I read in the file into a string called strLine. Then when I
do a a simple replace ... here is what I have tried:
strLine = strLine.Replace("ª", "#"); // Doesn't replace ...
strLine = strLine.Replace(@"ª", "#"); // Doesn't replace ...
strLine = strLine.Replace(@"\xAA", "#"); // Doesn't replace ...
if (strLine.Contains(@"\xAA")) MessageBox.Show("found one"); // No
message box ...
if (strLine.Contains("ª")) MessageBox.Show("found one"); // No message
box ...
if (strLine.Contains(@"ª")) MessageBox.Show("found one"); // No
message box ...
Any ideas either what I'm doing wrong, or a better way to try to
replace is persistent character that just won't go away?
found that I need to replace multiple instances of the character
"ª" (\xAA) with a # symbol. The input file is a simple one line
file. I read in the file into a string called strLine. Then when I
do a a simple replace ... here is what I have tried:
strLine = strLine.Replace("ª", "#"); // Doesn't replace ...
strLine = strLine.Replace(@"ª", "#"); // Doesn't replace ...
strLine = strLine.Replace(@"\xAA", "#"); // Doesn't replace ...
if (strLine.Contains(@"\xAA")) MessageBox.Show("found one"); // No
message box ...
if (strLine.Contains("ª")) MessageBox.Show("found one"); // No message
box ...
if (strLine.Contains(@"ª")) MessageBox.Show("found one"); // No
message box ...
Any ideas either what I'm doing wrong, or a better way to try to
replace is persistent character that just won't go away?