The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
ReplaceAll.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#include <boost/algorithm/string/replace.hpp>
12#include <string>
13#include <string_view>
14
15namespace details {
16 // External implementation using boost not to have to include
17 // boost in a header file
18 std::string replace_all( std::string str, std::string_view from, std::string_view to ) {
19 if ( from.empty() ) return str;
20 boost::replace_all( str, from, to );
21 return str;
22 }
23} // namespace details
std::string replace_all(std::string str, std::string_view from, std::string_view to)