aboutsummaryrefslogtreecommitdiff
path: root/include/stringop.h
diff options
context:
space:
mode:
authortaiyu <taiyu.len@gmail.com>2015-09-22 09:41:32 -0700
committertaiyu <taiyu.len@gmail.com>2015-09-22 09:41:32 -0700
commit494499617090eccf73a0c75380ca884e77548a9f (patch)
tree46356ae7b43ce6a2ea133771784a072294918f78 /include/stringop.h
parent6c33f8122a3c4bb8fc22129d1d2ad03f535885f7 (diff)
parent72aaffcf5b96f7d20438191e17c1df7174e52e66 (diff)
Merge branch 'master' of https://github.com/taiyu-len/sway
merge
Diffstat (limited to 'include/stringop.h')
-rw-r--r--include/stringop.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/stringop.h b/include/stringop.h
index f9f3130c..49bfa771 100644
--- a/include/stringop.h
+++ b/include/stringop.h
@@ -8,10 +8,11 @@ extern int setenv(const char *, const char *, int);
#endif
// array of whitespace characters to use for delims
-extern const char *whitespace;
+extern const char whitespace[];
char *strip_whitespace(char *str);
char *strip_comments(char *str);
+void strip_quotes(char *str);
// Simply split a string with delims, free with `free_flat_list`
list_t *split_string(const char *str, const char *delims);
@@ -27,5 +28,10 @@ int unescape_string(char *string);
char *join_args(char **argv, int argc);
char *join_list(list_t *list, char *separator);
+// split string into 2 by delim.
+char *cmdsep(char **stringp, const char *delim);
+// Split string into 2 by delim, handle quotes
+char *argsep(char **stringp, const char *delim);
+
char *strdup(const char *);
#endif