Skip to content

Commit

Permalink
Merge pull request esp8266#3269 from facchinm/PR847
Browse files Browse the repository at this point in the history
Add a Stream::find(char) method
  • Loading branch information
facchinm committed Jun 1, 2015
2 parents e55d414 + ed1b8eb commit 8cfaf3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hardware/arduino/avr/cores/arduino/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class Stream : public Print
bool find(uint8_t *target, size_t length) { return find ((char *)target, length); }
// returns true if target string is found, false if timed out

bool find(char target) { return find (&target, 1); }

bool findUntil(char *target, char *terminator); // as find but search ends if the terminator string is found
bool findUntil(uint8_t *target, char *terminator) { return findUntil((char *)target, terminator); }

Expand Down

0 comments on commit 8cfaf3c

Please sign in to comment.