ini-parser icon indicating copy to clipboard operation
ini-parser copied to clipboard

Support key-only entries, and keys with spaces

Open daiplusplus opened this issue 9 years ago • 5 comments

I would like this otherwise fine library to support INI files of the form:

[Example section name]
Foo=Bar

[Some List]
Entry 1
Entry 2
entry C
line four has spaces
and # some ; characters can legally be used

This would allow INI files to contain lists of data without needing to resort to hacks like embedded CSV:

[Section 1]
Some List="Entry1","Entry 2","entry c", "line four has spaes", "and # some ; characters can legally be used"

or adding =1 so every key is a key/value pair:

[Some List]
Entry 1=1
Entry 2=1
entry C=1
line four has spaces=1
and # some ; characters can legally be used=1

This counts as a feature-suggestion. Some INI libraries already support arbitrary value-less keys, though Windows' own INI format does not support them.

Perhaps make it an option of IniParserconfiguration: AllowValuelessKeys and AllowAnyCharacterInKey?

daiplusplus avatar Oct 15 '16 00:10 daiplusplus

I'll take a look at it

rickyah avatar Dec 05 '16 23:12 rickyah

Could you provide an example of other libraries allowing key less values @Jehoel? Can't find any and I would like to take a look at their approach.

Btw sorry for taking so long on looking at this issue, big personal changes in my life prevented me to spend some time on this side-project

rickyah avatar Feb 17 '17 10:02 rickyah

Hi, I was wondering if this was going to be implemented? I did not see this in any examples recently and it is exactly the functionality I was hoping to find. Thank you!

njtaz76 avatar Jan 12 '20 16:01 njtaz76

Hi @njtaz76, this feature will be available in the next release, or now if you are willing to compile the project yourself:

Please see this issue with more information: https://github.com/rickyah/ini-parser/issues/196

rickyah avatar Jan 12 '20 19:01 rickyah

Thank you

Sent from my iPhone

On Jan 12, 2020, at 2:31 PM, Ricardo Amores Hernández [email protected] wrote:

 Hi @njtaz76, this feature will be available in the next release, or now if you are willing to compile the project yourself:

Please see this issue with more information: #196

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

njtaz76 avatar Jan 12 '20 20:01 njtaz76