diff options
Diffstat (limited to 'util.c')
| -rw-r--r-- | util.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,5 +1,6 @@ #include <util.h> #include <curses.h> +#include "strings.h" void allLower(char* str) { for(int i=0;str[i];++i) @@ -18,3 +19,16 @@ void print_string(const char* str) /* print string, slowly */ ++i; } } +void remove_punct(char* buf) +{ + for(int i=0;buf[i];++i) + { + for(int j=0;j<sizeof(punctuation_marks)/sizeof(char);++j) + { + if(buf[i]==punctuation_marks[j]) + { + memmove(&buf[i], &buf[i+1], strlen(buf)-i); + } + } + } +} |