Skip to content

Commit ed1b8eb

Browse files
author
Martino Facchin
committed
Add a Stream::find(char) method
1 parent e55d414 commit ed1b8eb

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

+2
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)