Apple Interview Question

remove spaces in a string