You can try something like
string str = "Hello"; string replace = "hello"; string replaceWith = "hello world"; int i = str.IndexOf(replace, StringComparison.OrdinalIgnoreCase); int len = replace.Length; str = str.Replace(str.Substring(i, len), replaceWith);
See String.IndexOf Method (String, StringComparison)
Adriaan stander
source share