22 #ifndef __CCL_STRING_H__
23 # define __CCL_STRING_H__
85 # define ccl_string_compare ((ccl_compare_func *) strcmp)
92 # define ccl_string_cmp strcmp
256 ccl_string_has_prefix (
const char *pref,
const char *arg);
259 ccl_string_append_char (
const char *s,
char c);
ccl_ustring ccl_string_make_unique(const char *s)
Creates a unique string from the string s.
int ccl_string_equals(const void *str1, const void *str2)
Equality checking for strings.
void ccl_string_format_append_va(char **dst, const char *fmt, va_list pa)
Appends a formatted string to *dst.
char * ccl_string_dup(const char *s)
Duplicates the string s.
char * ccl_string_format_new(const char *fmt,...)
Allocates a formatted string.
void ccl_string_format_append(char **dst, const char *fmt,...)
Appends a formatted string to *dst.
ccl_ustring ccl_string_make_unique_from_int(int i)
Creates a unique string from an integer i.
Some useful and common macros.
void ccl_string_format_va(char **dst, size_t *size, const char *fmt, va_list pa)
Allocates a formatted string.
char * ccl_ustring
Alias type for strings that are stored in an internal dictionary and then can be used as identifiers ...
int ccl_string_parse_boolean(const char *s)
Interprets s as a Boolean value.
unsigned int ccl_string_hash(const void *ptr)
Hashes the string pointed by ptr.
void ccl_string_format(char **dst, size_t *size, const char *fmt,...)
Allocates a formatted string.
int ccl_string_parse_int(const char *s)
Interprets s as an integer value.
char * ccl_string_format_new_va(const char *fmt, va_list pa)
Allocates a formatted string.
void ccl_string_delete(void *ptr)
Deletion function for a string.