Finastra interview question

Question related string manipulation.