General Motors (GM) Interview Question

First question was string manipulation. Easy stuff.