added format_file() function

This commit is contained in:
2026-01-12 10:41:50 +01:00
parent 84148f92df
commit 8796199757
3 changed files with 49 additions and 5 deletions

View File

@@ -1,7 +1,9 @@
#include <string>
// Change template from file into html
// Return html in string
std::string inject_html_into_template(const std::string &FILE_NAME,
const std::string &TEMPLATE,
const std::string &HTML);
// @brief Format file.
// @param TEMPLATE_FILE File that you want to format in string.
// @param TEMPLATE Template that you want to replace. For example `{{title}}`
// @param INPUT Text that you want to replace TEMPLATE with.
// @return Formatted file in std::string
std::string format_file(const std::string &TEMPLATE_FILE,
const std::string &TEMPLATE, const std::string &INPUT);