Replace String in StringBuilder : StringBuilder « Development « Visual C++ .NET






Replace String in StringBuilder

 
#include "stdafx.h"
using namespace System;
using namespace System::Text;

int main()
{
   StringBuilder^ sb = gcnew StringBuilder("C", 30);

   sb->Append(gcnew array<Char>{'+','+'});

   sb->Append("/CLI.");

   sb->Insert(0, "asdf ");

   sb->Replace(".","!");

   Console::WriteLine( sb->ToString() );
}

   
  








Related examples in the same category

1.Add string to StringBuilder
2.Convert StringBuilder to String
3.Append to StringBuilder
4.Convert StringBuilder to String
5.Insert String to StringBuilder
6.Append char array to StringBuilder