Bloomberg interview question

string manipulation