Skip to content

Building a StringRecord from a raw line #326

Answered by BurntSushi
Ten0 asked this question in Q&A
Discussion options

You must be logged in to vote

I can't make heads or tails of what you're trying to do. But Reader::read_record is the way to read a single record.

If you want to parse a single CSV record from a single line, then you need to create a Reader for that single line.

But more generally, "parse a single CSV record from a single line" is incorrect because a CSV record can span multiple lines.

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@BurntSushi
Comment options

@Ten0
Comment options

@BurntSushi
Comment options

@BurntSushi
Comment options

@Ten0
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants