Arduino SD class / File class: feature request: readln() missing (... and more...)
- Dominant language
- Java
- Stars
- 14.6k
- Forks
- 7k
- PR merge metrics
- No merged PRs in 30d
Description
a method
.readStringUntil(EOL) or perhaps a new .readln()
is missing: to read an entire textline all at once until end of line, discarding any EoL/LF/CR
(e.g., text files on an SD may have \n or \r\n at EoL, so readStringUntil('\n') or readStringUntil('\r') may fail or mess it up)
edit, perhaps sth like my workaround
```
File SD_File;
String buf;
buf = SD_File.readStringUntil('\n');
int blen=buf.length();
if( blen>=1 && buf[blen-1]=='\r' ) buf.remove(blen-1, 1);
```
Contributor guide
Research direction
Start from the Arduino SD/File class and the SD_File.readStringUntil('\n') workaround described in the issue. Check how line endings are currently handled for LF and CRLF, then verify that the proposed readln-style behavior reads one complete line and discards either ending form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100