StringBuilder.Replace : StringBuilder « System.Text « C# / C Sharp by API






StringBuilder.Replace

  
using System;
using System.Text;

class UseSBApp {
    static void Main(string[] args) {
        StringBuilder sb = new StringBuilder("Pineapple");
        sb.Replace('e', 'X');
        sb.Insert(4, "Banana");
        sb.Append("Kiwi");
        sb.AppendFormat(", {0}:{1}", 123, 45.6789);
        sb.Remove(sb.Length - 3, 3);
        Console.WriteLine(sb);
    }
}

   
    
  








Related examples in the same category

1.new StringBuilder()
2.StringBuilder.Append
3.StringBuilder.AppendFormat
4.StringBuilder.Capacity
5.StringBuilder.GetType()
6.StringBuilder.Insert
7.StringBuilder.Length
8.StringBuilder.Remove
9.StringBuilder.ToString()