Skip to content

Instantly share code, notes, and snippets.

@stevewillard
Created August 4, 2008 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stevewillard/3909 to your computer and use it in GitHub Desktop.
Save stevewillard/3909 to your computer and use it in GitHub Desktop.
void squeeze ( char array[], int c ) {
int i, j;
for ( i = j = 0; array[i] != '\0'; ++i ) {
if ( array[i] != c )
array[j++] = array[i];
}
array[j] = '\0';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment