mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-15 04:30:42 +02:00
15 lines
456 B
C++
15 lines
456 B
C++
// Copyright (c) 2019 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#include <util/string.h>
|
|
|
|
#include <regex>
|
|
#include <string>
|
|
|
|
void ReplaceAll(std::string& in_out, const std::string& search, const std::string& substitute)
|
|
{
|
|
if (search.empty()) return;
|
|
in_out = std::regex_replace(in_out, std::regex(search), substitute);
|
|
}
|