77 when_true(separator ==
'[' || separator ==
']', exit);
79 if(isspace(separator) != 0) {
101 const char* separator,
106 const char* sep =
"";
126 if((txt != NULL) && (end != NULL) && (strcmp(txt, end) == 0)) {
135 if((txt != NULL) && (end != NULL) && (strcmp(txt, end) == 0)) {
160 const char* separator) {
Ambiorix variant API header file.
#define cstring_t
Convenience macro.
#define amxc_var_from_llist_it(ll_it)
Get the variant pointer from an amxc linked list iterator.
#define amxc_llist_for_each(it, list)
Loops over the list from head to tail.
int amxc_string_join_llist(amxc_string_t *string, const amxc_llist_t *list, char separator)
Joins a list of amxc_string_t values into a single string with a separator.
int amxc_string_join_var(amxc_string_t *string, const amxc_var_t *const var, const char *separator)
Joins a variant containing a list of variants into a single string.
int amxc_string_csv_join_var(amxc_string_t *string, const amxc_var_t *const var)
Joins a variant containing a list of variants into a single string using ',' as separator.
int amxc_string_ssv_join_var(amxc_string_t *string, const amxc_var_t *const var)
Joins a variant containing a list of variants into a single string using ' ' as separator.
int amxc_string_join_var_until(amxc_string_t *string, const amxc_var_t *const var, const char *separator, const char *end, bool remove)
Joins a variant containing a list of variants into a single string until the end string is encountere...
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.
int amxc_string_appendf(amxc_string_t *const string, const char *fmt,...) __attribute__((format(printf
Appends a formatted string to a string.
AMXC_INLINE bool amxc_string_is_empty(const amxc_string_t *const string)
Checks if the string is empty.
#define AMXC_VAR_ID_CSTRING
C-string variant id (aka char *), null terminated string.
#define AMXC_VAR_ID_SSV_STRING
Space Separated Values string variant id.
#define AMXC_VAR_ID_CSV_STRING
Comma Separated Values string variant id.
#define AMXC_VAR_ID_LIST
Ambiorix Linked List variant id.
uint32_t amxc_var_type_of(const amxc_var_t *const var)
Gets the variant type id of a variant.
#define amxc_var_dyncast(type, var)
Dynamic cast a variant to a certain type.
void amxc_var_delete(amxc_var_t **var)
Frees the previously allocated variant.
#define amxc_var_constcast(type, var)
Takes the content from a variant.
The linked list structure.
The variant struct definition.
static amxc_htable_it_t it[2000]