XAdapter interview question

write to replace part of a string with a given substring.