mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
refactor: Drop boost/algorithm/string/replace.hpp dependency
This commit is contained in:
parent
857526e8cb
commit
fea75ad3ca
3 changed files with 7 additions and 7 deletions
|
|
@ -4,11 +4,12 @@
|
|||
|
||||
#include <util/string.h>
|
||||
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
|
||||
#include <regex>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
void ReplaceAll(std::string& in_out, std::string_view search, std::string_view substitute)
|
||||
void ReplaceAll(std::string& in_out, const std::string& search, const std::string& substitute)
|
||||
{
|
||||
boost::replace_all(in_out, search, substitute);
|
||||
if (search.empty()) return;
|
||||
in_out = std::regex_replace(in_out, std::regex(std::move(search)), substitute);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue