-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for a "print()" function? #49
Comments
You can just do |
Thanks for the reply! Those don't quite fit the bill here AFAIK - those will write all sections (the entire contents) of the Ini object. What I'm looking to do is print only specific sections. To provide a visual example, say I have this:
The first
|
Hello,
Thank you for this crate! It's been a big help. That said, I was finding myself in the position of needing to extract some sections of an Ini and create a new collection of them, but there didn't appear to be any straightforward way to do so within this crate. So, I took to making my own
Print
trait and function that accomplished what I was looking for, that ended up looking like:With this, I was able to assemble a new Ini section collection from a larger one like:
This of course also allows me to print the contents of a specific section to stdout (or wherever). I'm sure this can be done with much better-looking code than I can come up with, but it seems to be doing the job presently. I think, as a feature request, it would be nice for this crate to support this kind of use-case natively.
Thanks!
The text was updated successfully, but these errors were encountered: