#include void trim_dashes (const char *s) { char *p; if ((p = strchr (s, '-'))) { for (s = p + 1; *s; s++, p++) if (*s != '-') *p = *s; else p--; *p = '\0'; } }