   Appending to a text buffer...
  How can I append to a text buffer? Say I want to add "hello" to the buffer, and then later in the program add "world"... how could I do that without replacing hello, but actually adding on so that the final string would read "helloworld"?Thanks in advance,Chris   
StringBuffer sb = new StringBuffer();sb.append("hello");sb.append("world");sb.append('!');String finalString = sb.toString();Buuuuut. Since you're likely assuming C++, see this thread, the code involving std::stringstream.   ;  Moved to For Beginners.   ;  if you are not using std::string but rather char* then you'll want to use the strcat_s function http://msdn.microsoft.com/en-us/library/d45bbxx4(VS.80).aspx;  Of course, you shouldn't be using char* at all unless you are using C. In C++, prefer std::string and std::stringstream, et cetera.   