Simplified scanWhiteSpaceChars method