Google Interview Question

a question about string manipulation