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