Apple Interview Question

Remove white spaces from a string