@@ -68,21 +68,21 @@ class Stream : public Print
6868 void setTimeout (unsigned long timeout); // sets maximum milliseconds to wait for stream data, default is 1 second
6969 unsigned long getTimeout (void ) { return _timeout; }
7070
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); }
7373 // returns true if target string is found, false if timed out (see setTimeout)
7474
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); }
7777 // returns true if target string is found, false if timed out
7878
7979 bool find (char target) { return find (&target, 1 ); }
8080
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); }
8383
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); }
8686
8787 long parseInt (LookaheadMode lookahead = SKIP_ALL, char ignore = NO_IGNORE_CHAR);
8888 // returns the first valid (long) integer value from the current position.
0 commit comments