#ifndef INI_FILE_HPP #define INI_FILE_HPP #include #include #include #include namespace osrm { namespace util { // support old capitalized option names by down-casing them with a regex replace inline std::string read_file_lower_content(const boost::filesystem::path &path) { boost::filesystem::fstream config_stream(path); std::string ini_file_content((std::istreambuf_iterator(config_stream)), std::istreambuf_iterator()); std::transform(std::begin(ini_file_content), std::end(ini_file_content), std::begin(ini_file_content), ::tolower); return ini_file_content; } } } #endif // INI_FILE_HPP