Skip to content

isWhiteSpace should match \r, \n, \f #593

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

Closed
shurik179 opened this issue Oct 10, 2020 · 2 comments
Closed

isWhiteSpace should match \r, \n, \f #593

shurik179 opened this issue Oct 10, 2020 · 2 comments
Labels

Comments

@shurik179
Copy link

According to docs on arduino website: https://www.arduino.cc/reference/tr/language/functions/characters/iswhitespace/ and common conventions, isWhiteSpace(c) should match space, \t, \v, \n, \r, \f .

Yet the implementation of this function in Adafruit_nRF52_Arduino/cores/nRF5/WCharacter.h only matches space and \t

@shurik179 shurik179 added the Bug label Oct 10, 2020
@ladyada
Copy link
Member

ladyada commented Oct 10, 2020

thanks could you submit a PR? :)

@shurik179
Copy link
Author

Actually I checked other cores and found that isWhitespace and isSpace in all of them is consistent with each other: isWhitespace is same as standard C isblank and isSpace is same as C isspace. Thus, it makes no sense to change implementation in Adafruit core. Instead, what really needs to be changed is documentation on Arduino website.

I am closing this issue then - sorry for the noise - and will file a bug report on Arduino website.

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

No branches or pull requests

2 participants