Skip to content

Add a Stream::find(char) method [imported] #847

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
cmaglie opened this issue Nov 15, 2012 · 0 comments · Fixed by #3269
Closed

Add a Stream::find(char) method [imported] #847

cmaglie opened this issue Nov 15, 2012 · 0 comments · Fixed by #3269
Milestone

Comments

@cmaglie
Copy link
Member

cmaglie commented Nov 15, 2012

This is Issue 847 moved from a Google Code project.
Added by 2012-03-06T16:59:23.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Medium

Original description

What change would like to see?
find(char) doesn't exist, which means you need to wrap a single character as a string.

Why?
The current situation is completely fine with literals - e.g find("$") instead of find('$') - but it can get unnecessarily complex with variables.

For instance you can't write:
char target;
...
find(target);

Instead you need to do something along the lines of:
char target;
...
char buf[2];
buf[0] = target;
buf[1] = 0x00;
find(buf);

@ffissore ffissore added the New label Feb 27, 2014
@ffissore ffissore modified the milestone: Release 1.6.5 Jun 1, 2015
Chris--A added a commit to Chris--A/Arduino that referenced this issue Jun 22, 2015
This is a feature added to the AVR core here:
arduino@ed1b8eb
It allows using the find method with a single char (arduino#847).
Chris--A added a commit to Chris--A/Arduino that referenced this issue Jul 10, 2015
This is a feature added to the AVR core here:
arduino@ed1b8eb
It allows using the find method with a single char (arduino#847).
Chris--A added a commit to Chris--A/Arduino that referenced this issue Jul 15, 2015
This is a feature added to the AVR core here:
arduino@ed1b8eb
It allows using the find method with a single char (arduino#847).
Chris--A added a commit to Chris--A/Arduino that referenced this issue Jul 17, 2015
This is a feature added to the AVR core here:
arduino@ed1b8eb
It allows using the find method with a single char (arduino#847).
Chris--A added a commit to Chris--A/Arduino that referenced this issue Jul 17, 2015
This is a feature added to the AVR core here:
arduino@ed1b8eb
It allows using the find method with a single char (arduino#847).
Chris--A added a commit to Chris--A/Arduino that referenced this issue Aug 3, 2015
This is a feature added to the AVR core here:
arduino@ed1b8eb
It allows using the find method with a single char (arduino#847).
sandeepmistry pushed a commit that referenced this issue Nov 23, 2015
This is a feature added to the AVR core here:
ed1b8eb
It allows using the find method with a single char (#847).
lmihalkovic pushed a commit to lmihalkovic/Arduino that referenced this issue Dec 31, 2015
This is a feature added to the AVR core here:
arduino@ed1b8eb
It allows using the find method with a single char (arduino#847).
ollie1400 pushed a commit to ollie1400/Arduino that referenced this issue May 2, 2022
This is a feature added to the AVR core here:
arduino@ed1b8eb
It allows using the find method with a single char (arduino#847).
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 a pull request may close this issue.

3 participants