@@ -68,21 +68,21 @@ class Stream : public Print
68
68
void setTimeout (unsigned long timeout); // sets maximum milliseconds to wait for stream data, default is 1 second
69
69
unsigned long getTimeout (void ) { return _timeout; }
70
70
71
- bool find (char *target); // reads data from the stream until the target string is found
72
- bool find (uint8_t *target) { return find ((char *)target); }
71
+ bool find (const char *target); // reads data from the stream until the target string is found
72
+ bool find (const uint8_t *target) { return find ((const char *)target); }
73
73
// returns true if target string is found, false if timed out (see setTimeout)
74
74
75
- bool find (char *target, size_t length); // reads data from the stream until the target string of given length is found
76
- bool find (uint8_t *target, size_t length) { return find ((char *)target, length); }
75
+ bool find (const char *target, size_t length); // reads data from the stream until the target string of given length is found
76
+ bool find (const uint8_t *target, size_t length) { return find ((const char *)target, length); }
77
77
// returns true if target string is found, false if timed out
78
78
79
79
bool find (char target) { return find (&target, 1 ); }
80
80
81
- bool findUntil (char *target, char *terminator); // as find but search ends if the terminator string is found
82
- bool findUntil (uint8_t *target, char *terminator) { return findUntil ((char *)target, terminator); }
81
+ bool findUntil (const char *target, const char *terminator); // as find but search ends if the terminator string is found
82
+ bool findUntil (const uint8_t *target, const char *terminator) { return findUntil ((const char *)target, terminator); }
83
83
84
- bool findUntil (char *target, size_t targetLen, char *terminate, size_t termLen); // as above but search ends if the terminate string is found
85
- bool findUntil (uint8_t *target, size_t targetLen, char *terminate, size_t termLen) {return findUntil ((char *)target, targetLen, terminate, termLen); }
84
+ bool findUntil (const char *target, size_t targetLen, const char *terminate, size_t termLen); // as above but search ends if the terminate string is found
85
+ bool findUntil (const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen) {return findUntil ((const char *)target, targetLen, terminate, termLen); }
86
86
87
87
long parseInt (LookaheadMode lookahead = SKIP_ALL, char ignore = NO_IGNORE_CHAR);
88
88
// returns the first valid (long) integer value from the current position.
0 commit comments