diff options
author | Danny Holman <dholman@gymli.org> | 2023-05-17 01:05:38 -0500 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2023-05-17 01:05:38 -0500 |
commit | c0e9790335313adb40435b6be06cc41114c0f2c9 (patch) | |
tree | 1bcdd7fd4eb55f469383655e4a09e60fe7a2869d /server/include | |
parent | 9996efa8e2010fd4ccfc357bc7e6240bda2edc69 (diff) |
server: create utility functions
Create a new file for utility functions, including those that strip
whitespace from and break apart strings.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'server/include')
-rw-r--r-- | server/include/util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/include/util.h b/server/include/util.h index edadc5a..39c130b 100644 --- a/server/include/util.h +++ b/server/include/util.h @@ -1,8 +1,13 @@ #ifndef MRAT_UTIL_H #define MRAT_UTIL_H +#include <stddef.h> + #define container_of(ptr, type, member) ({ \ const typeof(((type*)0)->member)*__mptr = (ptr); \ (type*)((char*)__mptr - offsetof(type, member)); }) +char* str_strip(char *str); +char** str_split(char *str, const char *delim); + #endif |