Skip to content

Instantly share code, notes, and snippets.

@aaronryank
Last active October 22, 2016 22:36
Show Gist options
  • Save aaronryank/c72ee2311872934e9366f778b0598425 to your computer and use it in GitHub Desktop.
Save aaronryank/c72ee2311872934e9366f778b0598425 to your computer and use it in GitHub Desktop.
void strstrip(int x, char *buf)
{
int i, j;
for (i = 0; i < x; i++) {
for (j = 0; buf[j+1] != '\0'; j++)
buf[j] = buf[j+1];
buf[j] = '\0';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment