I am going through an example of std::regex_replace
. The example uses this
std::regex_replace(std::ostreambuf_iterator<char>(std::cout),source.begin(), source.end(), search, "");
std::ostreambuf_iterator<char>(std::cout)
writes to std::cout
how do I make it write to a string instead ?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…