Skip to content

Parse content from a string, not a file #25

Description

@O-Tom

Hello,

I wanted to use ini-cpp to write unit tests on excerpts from .ini files that are directly embedded in the code as std::string_view (or std::string).
However, the only two constructors require a path or a file descriptor. None accept a .ini fragment.
Looking at the implementation of ini.h, I see that the Parse method might meet this need, but it is declared private.

Is it possible to modify the existing constructors or change the visibility of the Parse method to expand the capabilities and accommodate my use case ?
I could work around this by generating temporary files in my tests and using the current implementation, but that seems clunky to me.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions