mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Add Stream::find(char); to SAM core.
This is a feature added to the AVR core here:
ed1b8eb486
It allows using the find method with a single char (#847).
This commit is contained in:
parent
7857216e69
commit
245b948a27
@ -73,6 +73,8 @@ class Stream : public Print
|
|||||||
bool find(uint8_t *target, size_t length) { return find ((char *)target, length); }
|
bool find(uint8_t *target, size_t length) { return find ((char *)target, length); }
|
||||||
// returns true if target string is found, false if timed out
|
// 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(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); }
|
bool findUntil(uint8_t *target, char *terminator) { return findUntil((char *)target, terminator); }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user