MCPcopy Create free account
hub / github.com/ComputationalRadiationPhysics/picongpu / splitString

Function splitString

include/pmacc/misc/splitString.cpp:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 namespace misc
32 {
33 std::vector<std::string> splitString(std::string const& input, std::string const& delimiter)
34 {
35 std::regex re(delimiter);
36 // passing -1 as the submatch index parameter performs splitting
37 std::sregex_token_iterator first{input.begin(), input.end(), re, -1};
38 std::sregex_token_iterator last;
39
40 return {first, last};
41 }
42 } // namespace misc
43} // namespace pmacc

Callers 2

toTimeSliceFunction · 0.50
toRangeSliceFunction · 0.50

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected