Skip to content

Swap and correct the documentation of isSpace() and isWhitespace() #595

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 17, 2019
Merged

Swap and correct the documentation of isSpace() and isWhitespace() #595

merged 1 commit into from
May 17, 2019

Conversation

per1234
Copy link
Collaborator

@per1234 per1234 commented May 7, 2019

Although the documentation previously matched what you might expect these functions to do based on their names, the actual behavior of the functions is the reverse. In addition to this, isWhitespace() matches on horizontal tab as well as space, which was not mentioned in the isSpace() documentation. The decision was made to leave the long established implementation of the functions as-is to avoid causing breakage and to instead correct the documentation to match the actual behavior of the functions.

References:

Fixes arduino/Arduino#7041

Although the documentation previously matched what you might expect these functions to do based on their names, the actual behavior of the functions is the reverse. In addition to this, isWhitespace() matches on horizontal tab as well as space, which was not mentioned in the isSpace() documentation. The decision was made to leave the implementation of the functions as-is to avoid causing breakage and to correct the documentation to match the actual behavior of the functions.

More information:
arduino/ArduinoCore-API#27
@robsoncouto robsoncouto merged commit 8370cea into arduino:master May 17, 2019
@robsoncouto
Copy link
Contributor

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] isWhitespace() / isSpace()
2 participants