Skip to content

An .ini parser in C++ for parsing ini configuration files. All in one header file and support multiple levels

Notifications You must be signed in to change notification settings

Poordeveloper/ini-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

.ini parser

An .ini parser in C++ for parsing ini configuration files. All in one header file and support multiple levels.

example:

void test1()
{
  std::stringstream ss;

  ss << 
    "a=1\n"
    "b=1\n\n"
    "[e]\n"
    "ea=1\n"
    "eb=1\n\n"
    "[c]\n"
    "ca=2\n"
    "cb=2\n\n"
    "[[d]]\n"
    "da=3\n"
    "db=3\n\n"
    "[A]\n"
    "Aa=4\n"
    "Ab=4\n";

  INI::Parser p(ss);
  std::stringstream out;
  p.dump(out);
  assert(out.str() == ss.str());

  assert(p.top()["a"]=="1");
  assert(p.top()("e")["ea"]=="1");
}

Please check INI::Parser::dump function for iteration in original order.

License

Distributed under the MIT license.

About

An .ini parser in C++ for parsing ini configuration files. All in one header file and support multiple levels

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages