MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / splitString

Function splitString

Source/Falcor/Utils/StringUtils.cpp:77–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77std::vector<std::string> splitString(const std::string& str, const std::string& delim)
78{
79 std::string s;
80 std::vector<std::string> vec;
81 for (char c : str)
82 {
83 if (delim.find(c) != std::string::npos)
84 {
85 if (s.length())
86 {
87 vec.push_back(s);
88 s.clear();
89 }
90 }
91 else
92 {
93 s += c;
94 }
95 }
96 if (s.length())
97 {
98 vec.push_back(s);
99 }
100 return vec;
101}
102
103std::string joinStrings(const std::vector<std::string>& strings, const std::string& separator)
104{

Callers 10

resolveSearchPathsFunction · 0.85
filterTestsFunction · 0.85
executeProcessFunction · 0.85
msgBoxFunction · 0.85
createMaterialFunction · 0.85
expandValueToXYZFunction · 0.85
parseNamedVectorFunction · 0.85
parseRGBFunction · 0.85
parseXMLFunction · 0.85

Calls 3

lengthMethod · 0.45
push_backMethod · 0.45
clearMethod · 0.45

Tested by 1

filterTestsFunction · 0.68