diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-05-25 08:41:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-25 08:41:01 -0400 |
commit | a268a0c2ae9dcad918eae44bd325dc21977ac3fc (patch) | |
tree | 40eca41d98740ba8aa0065c50712c33b32a44595 /include/stringop.h | |
parent | Merge pull request #2035 from RyanDwyer/fix-focus-bug (diff) | |
parent | Clean up container title functions (diff) | |
download | sway-a268a0c2ae9dcad918eae44bd325dc21977ac3fc.tar.gz sway-a268a0c2ae9dcad918eae44bd325dc21977ac3fc.tar.zst sway-a268a0c2ae9dcad918eae44bd325dc21977ac3fc.zip |
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 @@ | |||
1 | #ifndef _SWAY_STRINGOP_H | 1 | #ifndef _SWAY_STRINGOP_H |
2 | #define _SWAY_STRINGOP_H | 2 | #define _SWAY_STRINGOP_H |
3 | #include <stdlib.h> | ||
3 | #include "list.h" | 4 | #include "list.h" |
4 | 5 | ||
5 | #if !HAVE_DECL_SETENV | 6 | #if !HAVE_DECL_SETENV |
@@ -14,6 +15,10 @@ char *strip_whitespace(char *str); | |||
14 | char *strip_comments(char *str); | 15 | char *strip_comments(char *str); |
15 | void strip_quotes(char *str); | 16 | void strip_quotes(char *str); |
16 | 17 | ||
18 | // strcat that does nothing if dest or src is NULL | ||
19 | char *lenient_strcat(char *dest, const char *src); | ||
20 | char *lenient_strncat(char *dest, const char *src, size_t len); | ||
21 | |||
17 | // strcmp that also handles null pointers. | 22 | // strcmp that also handles null pointers. |
18 | int lenient_strcmp(char *a, char *b); | 23 | int lenient_strcmp(char *a, char *b); |
19 | 24 | ||