diff --git a/include/cpptoml.h b/include/cpptoml.h
index 5a00da3..3b9ecc5 100644
--- a/include/cpptoml.h
+++ b/include/cpptoml.h
@@ -3231,6 +3231,21 @@ inline std::shared_ptr
parse_file(const std::string& filename)
return p.parse();
}
+
+/**
+ * Utility function to parse a file as a TOML file. Returns the root table.
+ * Throws a parse_exception if the file cannot be opened.
+ */
+inline std::shared_ptr parse_string(const std::string& toml)
+ {
+
+ std::stringstream data{toml};
+ parser p{data};
+ return p.parse();
+ }
+
+
+
template
struct value_accept;