Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add stringstream support. #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants