From b495294aa32ca838180af57efdb1f04727487d55 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Wed, 16 May 2012 15:39:34 -0400 Subject: 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 --- cores/arduino/Stream.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cores/arduino/Stream.h') 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 -- cgit v1.2.3-18-g5258