ATLAS Offline Software
Loading...
Searching...
No Matches
lineSplitter.cxx File Reference
Include dependency graph for lineSplitter.cxx:

Go to the source code of this file.

Functions

std::vector< std::string > lineSplitter (const std::string &s, char delimiter)

Function Documentation

◆ lineSplitter()

std::vector< std::string > lineSplitter ( const std::string & s,
char delimiter )

Definition at line 8 of file lineSplitter.cxx.

9 {
10
11 std::stringstream line (s);
12 std::string seg;
13 std::vector<std::string> segs;
14
15 while(std::getline(line, seg, delimiter)){
16 segs.push_back(seg);
17 }
18
19 return segs;
20}