Skip to content

Add stringstream support.#39

Open
IruzzArcana wants to merge 1 commit intometayeti:masterfrom
IruzzArcana:master
Open

Add stringstream support.#39
IruzzArcana wants to merge 1 commit intometayeti:masterfrom
IruzzArcana:master

Conversation

@IruzzArcana
Copy link

@IruzzArcana IruzzArcana commented Oct 6, 2024

As title suggests, adds an overload for INIFile which accepts a stringstream pointer, alongside two functions called readbuffer and writebuffer.

Example usage:

//reading
mINI::INIStructure ini_data;
std::stringstream inibuffer;
inibuffer << "[section]\nkey=value\nkey2=something";
mINI::INIFile file(&inibuffer);
file.readbuffer(ini_data);

//writing
mINI::INIStructure ini_data;
ini_data["section"]["key"] = "value";
std::stringstream inibuffer;
mINI::INIFile file(&inibuffer);
file.writebuffer(ini_data);

@metayeti
Copy link
Owner

metayeti commented Dec 6, 2024

Sorry this is taking a bit but I just haven't had time to look into it. It seems like it adds quite a lot of code though, I'm not sure if this functionality merits adding it. I'll look into it eventually and see whether or not this make sense to me. Thank you for the PR though!

@bramtechs
Copy link
Contributor

As mentioned in #35, I would love to see this feature added! I receive files over HTTP that are then only stored in memory.
The decision is ofcourse up to the maintainer. In the meantime I'll be relying on this fork.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants