#pragma once #include <string> std::wstring read_file_into_wstring(std::string filename); std::string read_file_into_string(std::string filename);
#include "read_file_into_string.hpp" #include <sstream> #include <fstream> std::wstring read_file_into_wstring(std::string filename) { std::wostringstream stream; stream << std::wifstream(filename).rdbuf(); return stream.str(); } std::string read_file_into_string(std::string filename) { std::ostringstream stream; stream << std::ifstream(filename).rdbuf(); return stream.str(); }