Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Recursive Character Search and Destroy

Name: Anonymous 2007-05-11 16:50 ID:tCgeez6Q

I receive a string, and I want to remove any 'a', 'b' and 'c' characters, in a recursive way.

How do I do this in C and Java?

Thanks

Name: Anonymous 2007-05-11 18:03 ID:LrEob0br

Since OP wanted something like C or Java...
Here's some pseudocode to get you started. Thought this up in about one minute, it might delete your pron folder or just fail it, although it probably won't.

Also, you may want to make the function take the unwanted characters as arguments.

string removeshit (string s){
  if(we come across one a, b or c in s){
    return removeshit(s with the one offending character removed);
  }
  return s;
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List