Also, if you want to remove all occurrences, check String.replace(CharSequence, CharSequence) (Java 5 and up) and String.replaceAll(String, String). And how about String.replaceFirst(String, String)? [ October 26, 2008: Message edited by: Rob Prime ]
Given two strings, base and remove, return a version of the base string where all instances of the remove string have been removed (not case sensitive). You may assume that the remove string is length 1 or more. Remove only non-overlapping instances, so with "xxx" removing "xx" leaves "x".
Look, at some point you need to demonstrate that you're putting some effort of your own into this process. It's not enough to simply re-state the question. Several posters have been offering help, but you haven't shown any work of your own yet. We're happy to help, but we don't want to do all of your work for you. So talk to us. Tell us what you think about the suggestions that have been given so far. Tell us what you understand, or what confuses you. Try to be specific. Show us that you're really trying, and not just waiting for someone to offer up some code that does what you want.
Good luck. [ October 27, 2008: Message edited by: Mike Simmons ]