-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Provide String::indexOf for a char* needle #7706
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for not only filing an issue, but proposing a solution too!
You mentioned progmem in your issue and changing to strstr_P
will make it "just work" with RAM or PROGMEM strings.
strstr_P documentation says only s2 must be from PROGMEM, so we are safe.
I've went ahead and implemented the changes. Should I change all But again I'm not an expert in this ecosystem. Btw did I break anything? The CI seems to have errored (I may have hurt their feelings by force pushing too much lol). |
(click on "details" on any CI line) edit: It is quite never needed to force-push. Pushing is OK, pulling is needed before pushing if the branch has been updated from github. That way, we have history. The history is anyway squashed at merge time on this repository. |
Thank you @d-a-v! I've just fixed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the single const change noted below, LGTM. Thx!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx! LGTM.
Fixes #7705