Skip to main content
Module

x/nonstd/mod.ts>StringBuilder

A library for useful features that aren't currently in the std library.
Latest
class StringBuilder
import { StringBuilder } from "https://deno.land/x/nonstd@v0.2.2/mod.ts";

Used to efficiently join many strings together.

Constructors

new
StringBuilder(value?: StringBuilder | string | number)

Creates the instance of StringBuilder.

Properties

private
_capacity: number
private
_length: number
private
_maxCapacity: number
private
_values: string[]
capacity: number
readonly
fragments: number
readonly
length: number
readonly
maxCapacity: number

Methods

private
ensureCapacity(value: string | StringBuilder): boolean
clear(count?: number): StringBuilder
flatten(): void
toString(): string