Replace char inside a string
using System;
public class TestStringsApp {
public static void Main(string[] args) {
string a = "strong";
// Replace all 'o' with 'i'
string b = a.Replace('o', 'i');
Console.WriteLine(b);
string c = b.Insert(3, "engthen");
string d = c.ToUpper();
Console.WriteLine(d);
}
}
Related examples in the same category