350 bool sqbrackets =
false;
351 bool add_empty =
true;
352 bool last_is_comma =
false;
361 last_is_comma =
false;
363 switch(txt_part[0]) {
372 sqbrackets = !sqbrackets;
384 if(csv_list != NULL) {
387 sqbrackets = !sqbrackets;
401 }
else if(add_empty) {
407 last_is_comma =
true;
424 }
else if(last_is_comma && add_empty) {
#define cstring_t
Convenience macro.
#define amxc_container_of(addr, type, member)
Calculates the address of the containing structure.
#define amxc_llist_for_each(it, list)
Loops over the list from head to tail.
enum _amxc_string_split_status amxc_string_split_status_t
The possible string split errors.
@ AMXC_ERROR_STRING_SPLIT_INVALID_INPUT
const char * amxc_string_get(const amxc_string_t *const string, const size_t offset)
Gets the content of the string buffer.
AMXC_INLINE int amxc_string_append(amxc_string_t *const string, const char *const text, const size_t length)
Appends text to the end of the current content of the string buffer.
#define amxc_string_from_llist_it(ll_it)
Get the pointer to a string structure from an amxc linked list iterator.
AMXC_INLINE size_t amxc_string_text_length(const amxc_string_t *const string)
Gets the current size of the used string buffer.
void amxc_string_trim(amxc_string_t *const string, amxc_string_is_char_fn_t fn)
Trim.
int amxc_string_init(amxc_string_t *const string, const size_t length)
Initializes a string.
AMXC_INLINE bool amxc_string_is_empty(const amxc_string_t *const string)
Checks if the string is empty.
void amxc_string_clean(amxc_string_t *const string)
Frees the string buffer and reset length attributes.
char * amxc_string_take_buffer(amxc_string_t *const string)
Takes the string buffer.
#define AMXC_VAR_ID_LIST
Ambiorix Linked List variant id.
#define amxc_var_add(type, var, data)
Convenience macro for adding a variant to composite variant type.
int amxc_var_set_type(amxc_var_t *const var, const uint32_t type)
Change the variant data type.
amxc_var_t * amxc_var_add_new(amxc_var_t *const var)
Adds a new variant to a composite variant.
#define amxc_var_push(type, var, val)
Pushes a value into the variant.
#define amxc_var_set(type, var, data)
Convenience macro for setting a value in a variant.
struct _amxc_llist * llist
The linked list structure.
The variant struct definition.
static amxc_htable_it_t it[2000]