diff options
author | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-11-19 11:52:58 +0100 |
---|---|---|
committer | S. Christoffer Eliesen <christoffer@eliesen.no> | 2015-11-21 22:22:09 +0100 |
commit | d0af224e6da2505601b9c068912903b3d32e37c6 (patch) | |
tree | 7db38e658ece1c7b65e9b4e57e7b2a511076f997 /include | |
parent | a33e3badad7fbfa7e229f009c5c1b78c552a935b (diff) | |
download | sway-d0af224e6da2505601b9c068912903b3d32e37c6.tar.xz |
stringop: lenient_strcmp: Add.
Diffstat (limited to 'include')
-rw-r--r-- | include/stringop.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/stringop.h b/include/stringop.h index febbbaba..bb681bcd 100644 --- a/include/stringop.h +++ b/include/stringop.h @@ -14,6 +14,9 @@ char *strip_whitespace(char *str); char *strip_comments(char *str); void strip_quotes(char *str); +// strcmp that also handles null pointers. +int lenient_strcmp(char *a, char *b); + // Simply split a string with delims, free with `free_flat_list` list_t *split_string(const char *str, const char *delims); void free_flat_list(list_t *list); |