MCPcopy Create free account
hub / github.com/BoomingTech/Piccolo / split

Function split

engine/source/meta_parser/parser/meta/meta_utils.cpp:109–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 }
108
109 std::vector<std::string> split(std::string input, std::string pat)
110 {
111 std::vector<std::string> ret_list;
112 while (true)
113 {
114 size_t index = input.find(pat);
115 std::string sub_list = input.substr(0, index);
116 if (!sub_list.empty())
117 {
118
119 ret_list.push_back(sub_list);
120 }
121 input.erase(0, index + pat.size());
122 if (index == -1)
123 {
124 break;
125 }
126 }
127 return ret_list;
128 }
129
130 std::string getFileName(std::string path)
131 {

Callers 5

getFileNameFunction · 0.70
formatPathStringFunction · 0.70
extractPropertiesMethod · 0.70
MetaParserMethod · 0.50
parseProjectMethod · 0.50

Calls 6

substrMethod · 0.80
findMethod · 0.45
emptyMethod · 0.45
push_backMethod · 0.45
eraseMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected