Files
SedPP/include/sedpp/Replacement.h
T
2026-06-09 00:22:22 -05:00

19 lines
483 B
C++

#pragma once
#include <regex.h>
#include <string>
#include <vector>
namespace sedpp {
// Expands an s-command replacement. Besides &, \1...\9, and literal escapes,
// GNU sed supports case-conversion state such as \U...\E and one-byte \u/\l.
class Replacement {
public:
static std::string expand(const std::string &replacement,
const std::string &subject,
const std::vector<regmatch_t> &groups);
};
} // namespace sedpp