MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / split

Function split

Src/Base/AMReX_String.cpp:44–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44std::vector<std::string> split (std::string const& s, std::string const& sep)
45{
46 std::vector<std::string> result;
47 std::size_t pos_begin, pos_end = 0;
48 while ((pos_begin = s.find_first_not_of(sep,pos_end)) != std::string::npos) {
49 pos_end = s.find_first_of(sep,pos_begin);
50 result.push_back(s.substr(pos_begin,pos_end-pos_begin));
51 if (pos_end == std::string::npos) { break; }
52 }
53 return result;
54}
55
56std::string join (std::vector<std::string> const& sv, char sep)
57{

Callers 2

getNewEnumNameValuePairsFunction · 0.85
getEnumNameStringsFunction · 0.85

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected