Skip to content

[Issue] Parse a std::string_view without converting to std::stringstream #250

@mnorfolk03

Description

@mnorfolk03

It seems that given a string, the only way to parse it is to put it into a std::stringstream.

If I already have a std::string_view containing my CSV data which I wish to parse, then to pass it to the CSVParser, I need to convert it to a std::stringstream, which will create an additional copy.

If it were a std::string I could move it into the stringstream, but it would be nice if there was a way for me externally to manage and own the data which the CSV Parser then reads, without creating unnecessary copies.

Since the parser should only read the data, I think this makes sense to have as an option

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions