Skip to content

Commit 8cfaf3c

Browse files
committed
Merge pull request #3269 from facchinm/PR847
Add a Stream::find(char) method
2 parents e55d414 + ed1b8eb commit 8cfaf3c

File tree

1 file changed

+2
-0
lines changed
  • hardware/arduino/avr/cores/arduino

1 file changed

+2
-0
lines changed

hardware/arduino/avr/cores/arduino/Stream.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ class Stream : public Print
6464
bool find(uint8_t *target, size_t length) { return find ((char *)target, length); }
6565
// returns true if target string is found, false if timed out
6666

67+
bool find(char target) { return find (&target, 1); }
68+
6769
bool findUntil(char *target, char *terminator); // as find but search ends if the terminator string is found
6870
bool findUntil(uint8_t *target, char *terminator) { return findUntil((char *)target, terminator); }
6971

0 commit comments

Comments
 (0)