8 #ifndef CLIBS_CSTRING_H 9 #define CLIBS_CSTRING_H 22 #ifndef _BOOL_IS_DEFINED 26 #define _BOOL_IS_DEFINED 29 #if __STDC_VERSION__ < 199901L 30 #ifndef _BOOL_IS_DEFINED 31 typedef unsigned char BOOL;
34 #define _BOOL_IS_DEFINED 37 #ifndef _BOOL_IS_DEFINED 42 #define _BOOL_IS_DEFINED 58 #define string_is_equal(a, b) (0 == strcmp((a), (b))) char * string_allocate(const char *s)
Allocate a new string out of string s.
Definition: cstring.c:101
char * string_allocate_substring(const char *s, size_t from, size_t to)
Allocate a new substring out of string s from from to to.
Definition: cstring.c:124
BOOL string_contains(const char *a, const char *b)
Check whether string a contains string b.
Definition: cstring.c:31
FILE * string_to_stream(char *s)
Convert a string to a file stream.
Definition: cstring.c:187
char * string_allocate_char(const char c)
Allocate a new string out of char c.
Definition: cstring.c:84
BOOL string_starts_with(const char *a, const char *b)
Check whether string a starts with string b.
Definition: cstring.c:18
char * string_concat(const char *a, const char *b)
Concat two strings and .
Definition: cstring.c:153
unsigned char BOOL
Custom boolean type.
Definition: boolean.h:30
BOOL string_is_space_only(const char *s)
Check whether string s composes of only spaces.
Definition: cstring.c:58