From c0e9790335313adb40435b6be06cc41114c0f2c9 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Wed, 17 May 2023 01:05:38 -0500 Subject: 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 --- server/include/util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'server/include') 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 + #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 -- cgit v1.2.3