sc_string Struct Reference

A dynamic string class. More...

#include <si_std/string.h>

List of all members.

Public Attributes

TCHAR * str_
s_uint32 capacity_
s_uint32 length_


Detailed Description

A dynamic string class.

A dynamically growable string. The string has both a length member and is NULL terminated. The growth factor is 3/2. That is, whenever the string needs to grow, it allocates storage that is the required amount * 1.5. This is done so that any small extra bits that are appended don't each cause an additional allocation/copy, at the expense of extra memory usage. Thus, it is efficient to append to this string may times to form much a much larger string. The actual capacity available is kept at capacity_.


Member Data Documentation

The size of the string buffer

The length of the string data at str_

The string buffer.


The documentation for this struct was generated from the following file:

doxygen