Apple interview question

Remove white spaces from a string