Top "Stringbuilder" questions

Stringbuilder is a class that provides a convenient and efficient way of working with text data in Java and .NET framework.

String builder vs string concatenation

What is the benefit and trade-off of using a string builder over pure string concatenation? new StringBuilder(32).append(str1) .append(" …

java stringbuilder string-concatenation
deleteCharAt or setLength, which way is better to remove last char from a StringBuilder/StringBuffer

In many cases, we need to delete the last char of a StringBuilder/StringBuffer. For example, given a int[]{1,2,3}, to …

java stringbuilder stringbuffer
StringBuilder Vs StringWriter/StringReader

I recently read that in StringWriter and StringReader are used for writing and reading from StringBuilder. Well when I use …

c# .net c#-3.0 stringbuilder stringreader
.NET StringBuilder preappend a line

I know that the System.Text.StringBuilder in .NET has an AppendLine() method, however, I need to pre-append a line …

c# .net vb.net stringbuilder
How is StringBuffer implementing append function without creating two objects?

It was an interview question. I was asked to implement the StringBuffer append function. I saw the code after the …

java string stringbuilder
Why use TagBuilder instead of StringBuilder?

what's the difference in using tag builder and string builder to create a table in a htmlhelper class, or using …

c# asp.net-mvc extension-methods stringbuilder tagbuilder
StringBuilder for string concatenation throws OutOfMemoryException

We mostly tend to following the above best practice. Have a look at String vs StringBuilder But StringBuilder could throw …

c# out-of-memory stringbuilder
String.Format vs "string" + "string" or StringBuilder?

Possible Duplicates: Is String.Format as efficient as StringBuilder C# String output: format or concat? What is the performance priority …

.net performance stringbuilder string-concatenation string.format
Gracefully remove "\n" delimiter after last String within StringBuilder

Have following Java code,that creates StringBuilder with "\n",i.e. carriage return delimiters: while (scanner.hasNextLine()){ sb.append(scanner.…

java string newline stringbuilder
Regex replacements inside a StringBuilder

I'm writing the contents of a text file to a StringBuilder and I then want to perform a number of …

c# regex stringbuilder