#include "include/util.hpp"

std::string reext(const std::string& fname) {
    size_t dot_pos = fname.rfind('.');
    if (dot_pos == std::string::npos) return fname + ".txt";

    return fname.substr(0, dot_pos) + ".txt";
}
