Append to StringBuilder : StringBuilder « Development « Visual C++ .NET






Append to 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.Convert StringBuilder to String
4.Replace String in StringBuilder
5.Insert String to StringBuilder
6.Append char array to StringBuilder