diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,4 @@ +#include <ctype.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> @@ -138,3 +139,11 @@ int run(const char *file, char *argv[]) return WEXITSTATUS(wstatus) == 0 ? 0 : -EPERM; } } + +char *trim(char *s) +{ + while (isspace(*s)) + s++; + + return s; +} |