aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/Stream.h
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2012-05-16 15:39:34 -0400
committerDavid A. Mellis <d.mellis@arduino.cc>2012-05-16 15:39:34 -0400
commitb495294aa32ca838180af57efdb1f04727487d55 (patch)
treea70f9b867dd4abff66d2cb12edd8b4e73b9ccc0b /cores/arduino/Stream.h
parent9a8976ce56bcdb70815dd58c1764d9e5c3b6fe95 (diff)
Adding readString() and readStringUntil() to Stream (Adrian McEwen).
This isn't necessarily a particularly efficient implementation (it allocates memory one character at a time and so may lead to fragmentation) but it seems to work. http://code.google.com/p/arduino/issues/detail?id=454
Diffstat (limited to 'cores/arduino/Stream.h')
-rw-r--r--cores/arduino/Stream.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cores/arduino/Stream.h b/cores/arduino/Stream.h
index 13f11be..58bbf75 100644
--- a/cores/arduino/Stream.h
+++ b/cores/arduino/Stream.h
@@ -82,6 +82,8 @@ class Stream : public Print
// returns the number of characters placed in the buffer (0 means no valid data found)
// Arduino String functions to be added here
+ String readString();
+ String readStringUntil(char terminator);
protected:
long parseInt(char skipChar); // as above but the given skipChar is ignored