diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-11 11:43:25 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-11 11:43:25 -0500 |
commit | 9bd603b639d7dd08fbe0af7e8669358bd066b7cd (patch) | |
tree | 8207b9680cc33846ff7d9ce0c8917aa052766c43 /include/str.h | |
parent | b828cc647f63de48c6e24f5a1043e052eb99b2a2 (diff) | |
download | spmc-9bd603b639d7dd08fbe0af7e8669358bd066b7cd.tar.gz |
Refactor project structure:
* Move prototypes and definitions to respective header files
* Renamed strings.h to str.h to avoid collision with standard library header
Diffstat (limited to 'include/str.h')
-rw-r--r-- | include/str.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/str.h b/include/str.h new file mode 100644 index 0000000..2674fb9 --- /dev/null +++ b/include/str.h @@ -0,0 +1,27 @@ +#ifndef SPM_STR_H +#define SPM_STR_H + +int num_chars(const char *sptr, int ch); +int startswith(const char *sptr, const char *pattern); +int endswith(const char *sptr, const char *pattern); +char *normpath(const char *path); +void strchrdel(char *sptr, const char *chars); +long int strchroff(const char *sptr, int ch); +void strdelsuffix(char *sptr, const char *suffix); +char** split(char *sptr, const char* delim); +void split_free(char **ptr); +char *join(char **arr, const char *separator); +char *substring_between(char *sptr, const char *delims); +void strsort(char **arr); +int find_in_file(const char *filename, const char *pattern); +int isrelational(char ch); +void print_banner(const char *s, int len); +char *strstr_array(char **arr, const char *str); +char **strdeldup(char **arr); +char *lstrip(char *sptr); +char *strip(char *sptr); +int isempty(char *sptr); +int isquoted(char *sptr); +char *normalize_space(char *s); + +#endif //SPM_STR_H |