My program is user enters a piece of text. In the text, some words will be replaced. For example:
... Tomorrow I go to school ...
May change tomorrow on the date after tomorrow for example.
I think I will insert special characters before and after the word can be replaced to locate.
But error will happen when user uses those special characters. Should you give me a way less than optimal?
Look forward to help.
Loading
Ryan AlfordPosted Dec 27, 2008, 10:10 PM
string stuff = "Tommorrow I go to school.";
string newStuff = stuff.Replace("Tommorrow", "Today");
Console.WriteLine(newStuff);
Console.ReadLine();