#include <aerospike/as_std.h>
Go to the source code of this file.
Data Structures | |
struct | as_string_builder |
Macros | |
#define | as_string_builder_inita(__sb, __capacity, __resize) |
Functions | |
AS_EXTERN bool | as_string_builder_append (as_string_builder *sb, const char *value) |
AS_EXTERN bool | as_string_builder_append_bytes (as_string_builder *sb, uint8_t *src, uint32_t size) |
AS_EXTERN bool | as_string_builder_append_char (as_string_builder *sb, char value) |
AS_EXTERN bool | as_string_builder_append_int (as_string_builder *sb, int val) |
AS_EXTERN bool | as_string_builder_append_int64 (as_string_builder *sb, int64_t val) |
static bool | as_string_builder_append_newline (as_string_builder *sb) |
AS_EXTERN bool | as_string_builder_append_uint (as_string_builder *sb, uint32_t val) |
AS_EXTERN bool | as_string_builder_append_uint64 (as_string_builder *sb, uint64_t val) |
static void | as_string_builder_assign (as_string_builder *sb, uint32_t buffer_size, char *buffer) |
AS_EXTERN void | as_string_builder_destroy (as_string_builder *sb) |
AS_EXTERN void | as_string_builder_init (as_string_builder *sb, uint32_t capacity, bool resize) |
static void | as_string_builder_reset (as_string_builder *sb) |
#define as_string_builder_inita | ( | __sb, | |
__capacity, | |||
__resize ) |
Initialize string builder with a stack allocated buffer.
Definition at line 66 of file as_string_builder.h.
AS_EXTERN bool as_string_builder_append | ( | as_string_builder * | sb, |
const char * | value ) |
Append null terminated string value to string buffer. Returns if successful or not.
AS_EXTERN bool as_string_builder_append_bytes | ( | as_string_builder * | sb, |
uint8_t * | src, | ||
uint32_t | size ) |
Append bytes in hex format to string buffer. Returns if successful or not.
AS_EXTERN bool as_string_builder_append_char | ( | as_string_builder * | sb, |
char | value ) |
Append a single character to string buffer. Returns if successful or not.
AS_EXTERN bool as_string_builder_append_int | ( | as_string_builder * | sb, |
int | val ) |
Append integer to string buffer. Returns if successful or not.
AS_EXTERN bool as_string_builder_append_int64 | ( | as_string_builder * | sb, |
int64_t | val ) |
Append signed 64 bit integer to string buffer. Returns if successful or not.
|
inlinestatic |
Append newline to string buffer. Returns if successful or not.
Definition at line 169 of file as_string_builder.h.
References as_string_builder_append_char().
AS_EXTERN bool as_string_builder_append_uint | ( | as_string_builder * | sb, |
uint32_t | val ) |
Append unsigned integer to string buffer. Returns if successful or not.
AS_EXTERN bool as_string_builder_append_uint64 | ( | as_string_builder * | sb, |
uint64_t | val ) |
Append unsigned 64 bit integer to string buffer. Returns if successful or not.
|
inlinestatic |
Assign external buffer to string builder. External buffers are not resized.
Definition at line 88 of file as_string_builder.h.
References as_string_builder::capacity, as_string_builder::data, as_string_builder::free, as_string_builder::length, and as_string_builder::resize.
AS_EXTERN void as_string_builder_destroy | ( | as_string_builder * | sb | ) |
Free the resources allocated to the buffer.
AS_EXTERN void as_string_builder_init | ( | as_string_builder * | sb, |
uint32_t | capacity, | ||
bool | resize ) |
Initialize string builder with a heap allocated buffer.
|
inlinestatic |
Initialize to empty string from current state. Capacity remains unchanged.
Definition at line 109 of file as_string_builder.h.
References as_string_builder::data, and as_string_builder::length.