Replace Char with String
using System; using System.Text; public class MainClass { static String ReplaceCharString(String s, char c1, String s2) { StringBuilder res = new StringBuilder(); for (int i = 0; i < s.Length; i++) if (s[i] == c1) res.Append(s2); else res.Append(s[i]); return res.ToString(); } }