Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Arduino SD class / File class: feature request: readln() missing (... and more...) #11635

Copy link
Copy link
Open
@dsyleixa

Description

@dsyleixa
Issue body actions

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CoreRelated to the code for the standard Arduino APIRelated to the code for the standard Arduino APIfeature requestA request to make an enhancement (not a bug fix)A request to make an enhancement (not a bug fix)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.