Microsoft interview question

Write an algorithm to parse a string for all non white space characters