bstr_builder.h File Reference
#include "dslib.h"
Go to the source code of this file.
Detailed Description
- Author:
- Ivan Ristic <ivanr@webkreator.com>
Define Documentation
#define BSTR_BUILDER_DEFAULT_SIZE 16 |
Typedef Documentation
Function Documentation
Adds one new string to the builder.
- Parameters:
-
- Returns:
- Success indication
Adds one new piece, in the form of a NUL-terminated string, to the builder.
- Parameters:
-
- Returns:
- Success indication
int bstr_builder_append_mem |
( |
bstr_builder_t * |
bb, |
|
|
const char * |
data, |
|
|
size_t |
len | |
|
) |
| | |
Adds one new piece, defined with the supplied pointer and length, to the builder.
- Parameters:
-
- Returns:
- Success indication
Clears this string builder, destroying all existing pieces. You may want to clear a builder once you've either read all the pieces and done something with them, or after you've converted the builder into a single string.
- Parameters:
-
Creates a new string builder.
- Returns:
- New string builder
Destroys an existing string builder, also destroying all the pieces stored within.
- Parameters:
-
Returns the size (the number of pieces) currently in a string builder.
- Parameters:
-
- Returns:
- size
Creates a single string out of all the pieces held in a string builder. This method will not destroy any of the pieces.
- Parameters:
-
- Returns:
- New string