ATLAS Offline Software
Event
xAOD
xAODTruthCnv
Root
removePrefix.cxx
Go to the documentation of this file.
1
// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
// Local include(s).
4
#include "
removePrefix.h
"
5
6
namespace
xAODMaker::Details
{
7
8
std::string
removePrefix
(std::string_view
str
, std::string_view
prefix
) {
9
10
if
(
str
.starts_with(
prefix
)) {
11
return
std::string(
str
.substr(
prefix
.size()));
12
}
13
return
std::string(
str
);
14
}
15
16
}
// namespace xAODMaker::Details
xAODMaker::Details::removePrefix
std::string removePrefix(std::string_view str, std::string_view prefix)
Remove a prefix from a string, if it exists.
Definition:
removePrefix.cxx:8
removePrefix.h
checkCorrelInHIST.prefix
dictionary prefix
Definition:
checkCorrelInHIST.py:391
xAODMaker::Details
Definition:
removePrefix.cxx:6
str
Definition:
BTagTrackIpAccessor.cxx:11
Generated on Mon Sep 29 2025 21:17:34 for ATLAS Offline Software by
1.8.18