diff options
author | Drew DeVault <[email protected]> | 2018-05-25 08:41:01 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2018-05-25 08:41:01 -0400 |
commit | a268a0c2ae9dcad918eae44bd325dc21977ac3fc (patch) | |
tree | 40eca41d98740ba8aa0065c50712c33b32a44595 /include/stringop.h | |
parent | 95cc84bd950f7c057a15f65d477462b5cc9527d2 (diff) | |
parent | db38b9bbf3cce4083c538209a7ce5ef1a1cf5f3f (diff) |
Merge pull request #2034 from RyanDwyer/cleanup-container-titles
Clean up container title functions
Diffstat (limited to 'include/stringop.h')
-rw-r--r-- | include/stringop.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/stringop.h b/include/stringop.h index 7c29a745..e7f58011 100644 --- a/include/stringop.h +++ b/include/stringop.h @@ -1,5 +1,6 @@ #ifndef _SWAY_STRINGOP_H #define _SWAY_STRINGOP_H +#include <stdlib.h> #include "list.h" #if !HAVE_DECL_SETENV @@ -14,6 +15,10 @@ char *strip_whitespace(char *str); char *strip_comments(char *str); void strip_quotes(char *str); +// strcat that does nothing if dest or src is NULL +char *lenient_strcat(char *dest, const char *src); +char *lenient_strncat(char *dest, const char *src, size_t len); + // strcmp that also handles null pointers. int lenient_strcmp(char *a, char *b); |