QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
dstring.h File Reference
This graph shows which files directly or indirectly include this file:

Data Structures

struct  dstring_mem_s
 
struct  dstring_s
 

Typedefs

typedef struct dstring_mem_s dstring_mem_t
 
typedef struct dstring_s dstring_t
 

Functions

dstring_t_dstring_new (dstring_mem_t *mem)
 Create a new dstring. More...
 
void dstring_adjust (dstring_t *dstr)
 Resize the string buffer if necessary. More...
 
void dstring_append (dstring_t *dstr, const char *data, unsigned int len)
 Append len bytes from data onto the end of the dstring. More...
 
void dstring_appendstr (dstring_t *dstr, const char *str)
 Append the null terminated string to the end of the dstring. More...
 
void dstring_appendsubstr (dstring_t *dstr, const char *str, unsigned int len)
 Append up to len bytes from the string to the end of the dstring. More...
 
void dstring_clear (dstring_t *dstr)
 Set the size of the dstring to 0 bytes. More...
 
void dstring_clearstr (dstring_t *dstr)
 Clear the dstring to be equivalent to "". More...
 
void dstring_copy (dstring_t *dstr, const char *data, unsigned int len)
 Copy len bytes from data into the dstring, replacing any existing data. More...
 
void dstring_copystr (dstring_t *dstr, const char *str)
 Copy the null terminated string into the dstring. More...
 
void dstring_copysubstr (dstring_t *dstr, const char *str, unsigned int len)
 Copy up to len bytes from the string into the dstring. More...
 
void dstring_delete (dstring_t *dstr)
 Delete a dstring. More...
 
char * dstring_freeze (dstring_t *dstr)
 Delete the dstring object retaining the string buffer. More...
 
void dstring_insert (dstring_t *dstr, unsigned int pos, const char *data, unsigned int len)
 Insert len bytes from data int the dstring at pos. More...
 
void dstring_insertstr (dstring_t *dstr, unsigned int pos, const char *str)
 Insert the null terminated string into the dstring at pos. More...
 
void dstring_insertsubstr (dstring_t *dstr, unsigned int pos, const char *str, unsigned int len)
 Insert up to len bytes from the string into the dstring at pos. More...
 
dstring_tdstring_new (void)
 
void dstring_replace (dstring_t *dstr, unsigned int pos, unsigned int rlen, const char *data, unsigned int len)
 Replace rlen bytes in dstring at pos with len bytes from data. More...
 
char * dstring_reserve (dstring_t *dstr, unsigned len)
 Open up a hole in the string buffer. More...
 
char * dstring_reservestr (dstring_t *dstr, unsigned len)
 Open up a hole in the string buffer. More...
 
void dstring_snip (dstring_t *dstr, unsigned int pos, unsigned int len)
 Remove len bytes from the dstring starting at pos. More...
 
dstring_tdstring_strdup (const char *str)
 Create a new dstring from a string. More...
 
dstring_t_dstring_newstr (dstring_mem_t *mem)
 Allocate a new dstring pre-initialized as a null terminated string. More...
 
dstring_tdstring_newstr (void)
 
int dvsprintf (dstring_t *dstr, const char *fmt, va_list args)
 Formatted printing to dstrings. More...
 
int dsprintf (dstring_t *dstr, const char *fmt,...)
 
int davsprintf (dstring_t *dstr, const char *fmt, va_list args)
 Formatted printing to dstrings. More...
 
int dasprintf (dstring_t *dstr, const char *fmt,...)
 

Variables

dstring_mem_t dstring_default_mem