About 204,000 results
Open links in new tab
  1. java - String, StringBuffer, and StringBuilder - Stack Overflow

    Jun 4, 2010 · StringBuilder is a mutable class that can be appended to, characters replaced or removed and ultimately converted to a String StringBuffer is the original synchronized version …

  2. How can I clear or empty a StringBuilder? - Stack Overflow

    Mar 4, 2011 · I'm using a StringBuilder in a loop and every x iterations I want to empty it and start with an empty StringBuilder, but I can't see any method similar to the .NET StringBuilder.Clear …

  3. String concatenation in Java - when to use +, StringBuilder and …

    Jul 29, 2015 · When should we use + for concatenation of strings, when is StringBuilder preferred and When is it suitable to use concat. I've heard StringBuilder is preferable for concatenation …

  4. String concatenation vs String Builder. Performance - Stack Overflow

    What would be more performance, keeping the concatenation or using an StringBuilder? StringBuilder bld = new StringBuilder() foreach (MyObject o in myList) …

  5. Difference between StringBuilder and StringBuffer - Stack Overflow

    Dec 10, 2008 · What is the main difference between StringBuffer and StringBuilder? Is there any performance issues when deciding on any one of these?

  6. string - When to use StringBuilder in Java - Stack Overflow

    It is supposed to be generally preferable to use a StringBuilder for string concatenation in Java. Is this always the case? What I mean is this: Is the overhead of creating a StringBuilder object,

  7. String.Join vs. StringBuilder: which is faster? - Stack Overflow

    Feb 25, 2009 · In a previous question about formatting a double[][] to CSV format, it was suggested that using StringBuilder would be faster than String.Join. Is this true?

  8. How to append a newline to StringBuilder - Stack Overflow

    Jan 26, 2013 · 297 I have a StringBuilder object, StringBuilder result = new StringBuilder(); result.append(someChar); Now I want to append a newline character to the StringBuilder. How …

  9. StringBuilder.Append Vs StringBuilder.AppendFormat - Stack …

    Aug 20, 2011 · Since you are using Strings the StringBuilder can use the String overload for Append. AppendFormat takes a String and then an Object[] which means that the format will …

  10. c# - StringBuilder and Indentation - Stack Overflow

    May 7, 2021 · I am trying to indent block of strings in a StringBuilder, but what I am getting is just the indentation of 1st line. I understand why it is doing so, but don't know if there is any easy …