String Builder

Noun · Development

Definitions

  1. A mutable buffer class (e.g., Java's `StringBuilder`, C#'s `StringBuilder`, Go's `strings.Builder`) that efficiently constructs strings by appending segments to an internal buffer, avoiding the repeated memory allocation and copying that occurs when concatenating immutable string objects in a loop.

    In plain English: A tool for building up a long piece of text efficiently by adding to a single buffer, instead of creating a new copy of the entire text every time you add more.

    Example: "Concatenating in a loop created 10,000 intermediate strings — switching to a StringBuilder cut the method from 200ms to 2ms."

Related Terms