Bloomberg Interview Question

it was some string manipulation question