1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-21 21:22:31 +03:00

Improved readString() for File (#5445)

* added new boards

* corrected block size error

* added board to last commit working well

* override of readString for File class
Stream::readString requires a timeout of 1 seconds + multiple memory resize

* correct indent
return if size 0 before reserve

* correct indent

* good indent

* stricter test for end of string

* same implementation than Stream by replacing timeRead by read

* reading file by block of 256

* make sure there is an end of string

* fixed bug for file size multiple of 256
string::concate(char*) needs a string terminator to work
This commit is contained in:
apicquot
2019-02-04 03:08:54 -05:00
committed by Develo
parent 8c01516f8a
commit e43a586f0d
3 changed files with 18 additions and 2 deletions

View File

@ -101,7 +101,7 @@ 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();
virtual String readString();
String readStringUntil(char terminator);
protected: