diff options
author | 2015-09-07 18:14:37 -0400 | |
---|---|---|
committer | 2015-09-07 18:14:37 -0400 | |
commit | 7654f5e7cdbf5edff2f576a59cf04c530dd6efb5 (patch) | |
tree | 8496fd8673d31bac1802d756885a8fc64245a552 /include/stringop.h | |
parent | Merge pull request #172 from taiyu-len/master (diff) | |
parent | strdup + style (diff) | |
download | sway-7654f5e7cdbf5edff2f576a59cf04c530dd6efb5.tar.gz sway-7654f5e7cdbf5edff2f576a59cf04c530dd6efb5.tar.zst sway-7654f5e7cdbf5edff2f576a59cf04c530dd6efb5.zip |
Merge pull request #173 from taiyu-len/config_mode
config modes
Diffstat (limited to 'include/stringop.h')
-rw-r--r-- | include/stringop.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/stringop.h b/include/stringop.h index 7d17af95..dde50f13 100644 --- a/include/stringop.h +++ b/include/stringop.h | |||
@@ -2,17 +2,25 @@ | |||
2 | #define _SWAY_STRINGOP_H | 2 | #define _SWAY_STRINGOP_H |
3 | #include "list.h" | 3 | #include "list.h" |
4 | 4 | ||
5 | char *strip_whitespace(char *str, int *trimmed_start); | 5 | // array of whitespace characters to use for delims |
6 | extern const char *whitespace; | ||
7 | |||
8 | char *strip_whitespace(char *str); | ||
6 | char *strip_comments(char *str); | 9 | char *strip_comments(char *str); |
7 | 10 | ||
8 | // Must be freed with free_flat_list | 11 | // Simply split a string with delims, free with `free_flat_list` |
9 | list_t *split_string(const char *str, const char *delims); | 12 | list_t *split_string(const char *str, const char *delims); |
10 | void free_flat_list(list_t *list); | 13 | void free_flat_list(list_t *list); |
11 | 14 | ||
15 | // Splits an argument string, keeping quotes intact | ||
16 | char **split_args(const char *str, int *argc); | ||
17 | void free_argv(int argc, char **argv); | ||
18 | |||
12 | char *code_strchr(const char *string, char delimiter); | 19 | char *code_strchr(const char *string, char delimiter); |
13 | char *code_strstr(const char *haystack, const char *needle); | 20 | char *code_strstr(const char *haystack, const char *needle); |
14 | int unescape_string(char *string); | 21 | int unescape_string(char *string); |
15 | char *join_args(char **argv, int argc); | 22 | char *join_args(char **argv, int argc); |
16 | char *join_list(list_t *list, char *separator); | 23 | char *join_list(list_t *list, char *separator); |
17 | 24 | ||
25 | char *strdup(const char *); | ||
18 | #endif | 26 | #endif |