MCPcopy Create free account
hub / github.com/baldurk/renderdoc / split

Function split

renderdoc/strings/string_utils.cpp:184–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void split(const rdcstr &in, rdcarray<rdcstr> &out, const char sep)
185{
186 if(in.empty())
187 return;
188
189 {
190 size_t numSeps = 0;
191
192 int offset = in.find(sep);
193 while(offset >= 0)
194 {
195 numSeps++;
196 offset = in.find(sep, offset + 1);
197 }
198
199 out.reserve(numSeps + 1);
200 out.clear();
201 }
202
203 int32_t begin = 0;
204 int32_t end = in.find(sep);
205
206 while(end >= 0)
207 {
208 out.push_back(in.substr(begin, end - begin));
209
210 begin = end + 1;
211 end = in.find(sep, begin);
212 }
213
214 if(begin < in.count() || (begin == in.count() && in.back() == sep))
215 out.push_back(in.substr(begin));
216}
217
218void merge(const rdcarray<rdcstr> &in, rdcstr &out, const char sep)
219{

Callers 15

string_utils.cppFile · 0.85
CacheDebuggerPresentFunction · 0.85
BecomeRemoteServerMethod · 0.85
GetPathForPackageFunction · 0.85
TickMethod · 0.85
EnumerateDevicesFunction · 0.85
ListFolderMethod · 0.85
StartRemoteServerMethod · 0.85
FetchEnabledExtensionsFunction · 0.85

Calls 8

emptyMethod · 0.45
findMethod · 0.45
reserveMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45
substrMethod · 0.45
countMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected