strbuf

A growable string buffer for Carp. Provides amortized O(1) appends, unlike String.append which allocates on every call.

Usage

(let [sb (StringBuf.create)]
  (do
    (StringBuf.append-str &sb "hello ")
    (StringBuf.append-int &sb 42)
    (println* &(StringBuf.to-string &sb))
    (StringBuf.delete sb)))