Hm?
Code:
char *strip_after(char *buf, size_t stripindex)
{
  buf[min(strlen(buf), stripindex)] = '\0';