Small, Fast S-Expression Library
Data Fields
__cstring Struct Reference

#include <cstring.h>

Data Fields

char * base
size_t len
size_t curlen

Detailed Description

cstring.h : c string library to make Ron happy. Wrapper around plain C strings that handles automatically growing the string as data is concattenated to the end. (note: this is an improved version of cstring from supermon. Migrate it into that library eventually... )

-matt sottile Structure wrapping the character pointer and size counters (allocated vs. actual used).


Field Documentation

char* base

Base address of the string.

size_t curlen

Current size of the string stored in the buffer. len >= curlen always, and when len < curlen would be true after a concat operation, we realloc bigger space to keep len >= curlen.

size_t len

Size of the memory allocated and pointed to by the base pointer.