ATLAS Offline Software
Loading...
Searching...
No Matches
trim.cxx
Go to the documentation of this file.
1// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
4#include "trim.h"
5
6namespace GlobalSim {
7 std::string trim(std::string s){
8 const char* t = " \t\n\r\f\v";
9
10 // trim from right
11 auto l_rtrim = [&t](std::string& str){
12 str.erase(str.find_last_not_of(t) + 1);
13 return str;
14 };
15
16 // trim from left
17 auto l_ltrim = [&t] (std::string& str){
18 str.erase(0, str.find_first_not_of(t));
19 return str;
20 };
21
22 auto rs = l_rtrim(s);
23 return l_ltrim(rs);
24 }
25}
static Double_t rs
AlgTool that to test whether expected the TIP values generated by data supplied by eEmMultTestBench c...
std::string trim(std::string s)
Definition trim.cxx:7