Amazon interview question

Remove substring from a string.