aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/Stream.h
diff options
context:
space:
mode:
authorMartino Facchin <facchinm@users.noreply.github.com>2015-03-24 15:24:42 +0000
committerMartino Facchin <facchinm@users.noreply.github.com>2015-03-24 15:24:42 +0000
commit6ae8a700f389a191db4f1fa213770b1a72471c99 (patch)
treed5bd00ddf64e72287a9441a605df999ed4d6954a /cores/arduino/Stream.h
parentf2debfa2555fe26f72832378d3fd7e78fe881e0c (diff)
parent8504a809ddb9b191056da7036d2a3bb9bd5040be (diff)
Merge pull request #2814 from facchinm/test_pr2696
Fix findUntil in Stream library
Diffstat (limited to 'cores/arduino/Stream.h')
-rw-r--r--cores/arduino/Stream.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/cores/arduino/Stream.h b/cores/arduino/Stream.h
index 5cf5ddf..d0b1f32 100644
--- a/cores/arduino/Stream.h
+++ b/cores/arduino/Stream.h
@@ -97,6 +97,20 @@ class Stream : public Print
// this allows format characters (typically commas) in values to be ignored
float parseFloat(char skipChar); // as above but the given skipChar is ignored
+
+ public:
+ struct MultiTarget {
+ const char *str; // string you're searching for
+ size_t len; // length of string you're searching for
+ size_t index; // index used by the search routine.
+ };
+
+ // This allows you to search for an arbitrary number of strings.
+ // Returns index of the target that is found first or -1 if timeout occurs.
+ int findMulti(struct MultiTarget *targets, int tCount);
+
+
};
+
#endif