plptools
Loading...
Searching...
No Matches
ini Namespace Reference

Functions

std::unique_ptr< std::unordered_map< std::string, std::string > > deserialize (const std::string contents)
 Simple parser for flat ini data. More...
 
std::string serialize (const std::unordered_map< std::string, std::string > &contents)
 Outputs simple flat ini data. More...
 

Function Documentation

◆ deserialize()

std::unique_ptr< std::unordered_map< std::string, std::string > > ini::deserialize ( const std::string  contents)

Simple parser for flat ini data.

Does not support sections or quoted values. Supports Windows and Unix line endings.

Definition at line 49 of file ini.cc.

◆ serialize()

std::string ini::serialize ( const std::unordered_map< std::string, std::string > &  contents)

Outputs simple flat ini data.

Does not currently attempt to quote values (multi-line strings and strings with trailing whitespace will break this.)

Definition at line 30 of file ini.cc.