axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
Macros | Functions
Axl String: String functions provided by the Axl Stream module.

Macros

#define axl_check_undef(ref)   (ref ? ref : "NULL")
 Convenient interface to check if an string reference is NULL to return an static "undefined string". More...
 
#define axl_concat   axl_stream_concat
 Alias definition for the axl_stream_concat. More...
 
#define axl_freev   axl_stream_freev
 Alias definition for the axl_stream_freev. More...
 
#define axl_join   axl_stream_join
 Alias definition for the axl_stream_join. More...
 
#define axl_replace(source, string, replacement)   axl_stream_replace(&source,-1,string,-1,replacement,-1)
 Simple macro that implements a non-binary string replace. More...
 
#define axl_split   axl_stream_split
 Alias definition for the axl_stream_split. More...
 
#define axl_strdup_printf   axl_stream_strdup_printf
 Alias definition for axl_stream_strdup_printf. More...
 
#define axl_strdup_printfv   axl_stream_strdup_printfv
 Alias definition for axl_stream_strdup_printfv. More...
 

Functions

axl_bool axl_casecmp (const char *string, const char *string2)
 Allows to do a case insensitive string comparison. More...
 
axl_bool axl_cmp (const char *string, const char *string2)
 Allows to compare two strings provided, s1 and s1 to be equal. More...
 
axl_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. More...
 
char * axl_strdup (const char *string)
 Perform a memory copy from the string provided. More...
 
void axl_stream_clean_split (char **split)
 Allows to clean an split created by axl_stream_split by removing all items found to be empty strings. More...
 
char * axl_stream_concat (const char *chunk1, const char *chunk2)
 Allows to concatenate the two given strings into a single one. More...
 
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 **. More...
 
char * axl_stream_join (char **strings, const char *separator)
 Allows to implement the oposite operation of axl_stream_split, by joing all strings provided inside the array (strings), using as separator the value provided. More...
 
int axl_stream_printf_buffer (char *buffer, int buffer_size, int *real_size, const char *format,...)
 Allows to perform a printf operation on the provided buffer (which must be allocated by the caller, and its size signaled by buffer_size). More...
 
int axl_stream_printf_limit (void)
 Allows get current limit for axl_stream_printf operations. More...
 
void axl_stream_remove (char *chunk, const char *value, axl_bool first)
 Allows to remote occurences of value from the provided string (chunk). More...
 
int axl_stream_replace (char **source, int source_len, const char *string, int string_len, const char *replacement, int replacement_len)
 Allows to replace the provided string by the provided replacement on the provided source string, doing the replacement in an effective manner. More...
 
axl_bool axl_stream_setup_check (axlStream *stream, const char *source_encoding, axlStreamContentCheck check, axlPointer user_data, axlError **error)
 Function that allows to configure a handler that is executed to check content read into the axl stream buffer. More...
 
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. More...
 
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. More...
 
char * axl_stream_strdup_n (const char *chunk, int n)
 Allows to perform a copy for the n first bytes from the chunk received. More...
 
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. More...
 
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. More...
 
char * axl_stream_strdup_printfv (const char *chunk, va_list args)
 DEPRECATED: Allows to produce an string representing the message hold by chunk with the parameters provided. More...
 
int axl_stream_strv_num (char **chunks)
 Returns current number of items inside the chunks reference provided. More...
 
char * axl_stream_to_lower (char *chunk)
 Allows to convert the provided string into lower cases letter. More...
 
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. More...
 
char * axl_stream_to_upper (char *chunk)
 Makes the provided string to be converted to upper case letters. More...
 
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. More...
 
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. More...
 
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. More...
 
int axl_stream_vprintf_len (const char *format, va_list args)
 

Detailed Description