Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
bool AppendStringToByteBuffer(ByteBuffer *buffer_p, const char *const value_s)
Append a string to a ByteBuffer's data buffer.
bool AppendStringsToByteBuffer(ByteBuffer *buffer_p, const char *value_s,...)
Append a varargs array of strings to a ByteBuffer's data buffer.
void ReplaceCharsInByteBuffer(ByteBuffer *buffer_p, char old_data, char new_data)
Replace each instance of a character within a ByteBuffer with another.
void ResetByteBuffer(ByteBuffer *buffer_p)
Clear any data stored in a ByteBuffer.
void RemoveFromByteBuffer(ByteBuffer *buffer_p, size_t size)
Remove data from the end of a byte buffer.
const char * GetByteBufferData(const ByteBuffer *const buffer_p)
Get the data stored in a ByteBuffer.
bool AppendVarArgsToByteBuffer(ByteBuffer *buffer_p, const char *value_s, va_list args)
Append a va_list of strings to a ByteBuffer's data buffer.
size_t GetByteBufferSize(const ByteBuffer *const buffer_p)
Get the currently used size of a ByteBuffer's data buffer.
bool ResizeByteBuffer(ByteBuffer *buffer_p, size_t new_size)
Resize a ByteBuffer.
bool ExtendByteBuffer(ByteBuffer *buffer_p, size_t increment)
Increase the size of a ByteBuffer's data buffer.
char * DetachByteBufferData(ByteBuffer *const buffer_p)
Get the data stored in a ByteBuffer and free a ByteBuffer.
bool AppendToByteBuffer(ByteBuffer *buffer_p, const void *data_p, const size_t data_length)
Append some data to a ByteBuffer's data buffer.
size_t GetRemainingSpaceInByteBuffer(const ByteBuffer *const buffer_p)
Get the remaining space in a ByteBuffer's data buffer.
ByteBuffer * AllocateByteBuffer(size_t initial_size)
Allocate a ByteBuffer.
A datatype to allow an automatically growing buffer for appending data to.
Definition: byte_buffer.h:35
#define GRASSROOTS_UTIL_API
Definition: grassroots_util_library.h:47
void FreeByteBuffer(ByteBuffer *buffer_p)
Free a ByteBuffer.