From 2c8b9f2cfc287752add4a51b62a6da460c82ce59 Mon Sep 17 00:00:00 2001 From: Szymon P Date: Sun, 11 Jan 2026 20:50:49 +0100 Subject: [PATCH] rename replace to replace_once --- src/formatter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/formatter.cpp b/src/formatter.cpp index 202013d..c71408f 100644 --- a/src/formatter.cpp +++ b/src/formatter.cpp @@ -3,8 +3,8 @@ #include #include -static bool replace(std::string &str, const std::string &from, - const std::string &to) { +static bool replace_once(std::string &str, const std::string &from, + const std::string &to) { size_t start_pos = str.find(from); if (start_pos == std::string::npos) return false; @@ -23,7 +23,7 @@ std::string inject_html_into_template(const std::string &FILE_NAME, std::ostringstream ss; ss << file.rdbuf(); result = ss.str(); - if (replace(result, TEMPLATE, HTML)) { + if (replace_once(result, TEMPLATE, HTML)) { return result; } return "";