Cap String

CapString is similar to a CapArray.

It is performance friendly string.

It is like an ansistring in that it is automatically managed unlike a pointer to a char..

It really is just a smart pointer to a char though.

It has an initial capacity, a growby parameter (or property), and acts like a normal string.

Instead of allocating tiny amounts of memory each time the string concatenates more text, it grows in chunks.

Was developed by someone when they got sick of memalloc, realloc, or built in ansistrings allocating memory each time text was concatenated into them.

See also Java's java.util.StringBuffer class


EditText of this page (last edited October 6, 2014) or FindPage with title or text search