Axl String: String functions provided by the Axl Stream module.


Defines

#define axl_strdup_printf   axl_stream_strdup_printf
 Alias definition for axl_stream_strdup_printf.
#define axl_strdup_printfv   axl_stream_strdup_printfv
 Alias definition for axl_stream_strdup_printfv.

Functions

bool axl_cmp (const char *string, const char *string2)
 Allows to compare two strings provided, s1 and s1 to be equal.
bool axl_memcmp (const char *string, const char *string2, int size)
 Allows to check if both strings provided are equal on its initial size bytes.
char * axl_strdup (const char *string)
 Perform a memory copy from the string provided.
char * axl_stream_concat (const char *chunk1, const char *chunk2)
 Allows to concatenate the two given strings into a single one.
void axl_stream_freev (char **chunks)
 Allows to release memory used by elements returned by axl_stream_split and other function that return a pointer to a char **.
char ** axl_stream_split (const char *chunk, int separator_num,...)
 Allows to split the provided chunk, into several pieces that are separated by the separator (or separators) provided.
char * axl_stream_strdup (const char *chunk)
 Allows to copy the given chunk, supposing that is a properly format C string that ends with a '\0' value.
char * axl_stream_strdup_n (const char *chunk, int n)
 Allows to perform a copy for the n first bytes from the chunk received.
char * axl_stream_strdup_printf (const char *chunk,...)
 Allows to produce an newly allocated string produced by the chunk received plus arguments, using the printf-like format.
char * axl_stream_strdup_printf_len (const char *chunk, int *chunk_size,...)
 Allows to create a newly allocated chunk, providing its values as a printf call function, but also returning the chunk size.
char * axl_stream_strdup_printfv (const char *chunk, va_list args)
 Allows to produce an string representing the message hold by chunk with the parameters provided.
int axl_stream_strv_num (char **chunks)
 Returns current number of items inside the chunks reference provided.
char * axl_stream_to_lower (char *chunk)
 Allows to convert the provided string into lower cases letter.
char * axl_stream_to_lower_copy (const char *chunk)
 Allows to perform a to lower operation, like axl_stream_to_upper, but returning an new allocated reference.
char * axl_stream_to_upper (char *chunk)
 Makes the provided string to be converted to upper case letters.
char * axl_stream_to_upper_copy (const char *chunk)
 Allows to perform a to upper operation, like axl_stream_to_upper, but returning an new allocated reference.
void axl_stream_trim (char *chunk)
 Allows to trim the provided chunk, removing all white spaces (returns, white spaces, carry return and tabulars) that comes as preffix and suffix for the string provided, referenced by chunk.
void axl_stream_trim_with_size (char *chunk, int *trimmed)
 The function works like axl_stream_trim, but providing the count of bytes trimmed from the string.