Skip to content

Instantly share code, notes, and snippets.

@JosephPecoraro
Forked from stevewillard/C squeeze func
Created August 4, 2008 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JosephPecoraro/3912 to your computer and use it in GitHub Desktop.
Save JosephPecoraro/3912 to your computer and use it in GitHub Desktop.
void str_remove_char ( char array[], int c ) {
int i, j;
for ( i = j = 0; array[i]; ++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