MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / Split

Function Split

Source/Utility/StringUtil.cpp:20–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20void Split(ConstStringRef str, char split_char, std::vector<ConstStringRef> * pieces)
21{
22 ConstStringRef cur = str;
23
24 for (const char * p = str.Begin; p < str.End; ++p)
25 {
26 if (*p == split_char)
27 {
28 cur.End = p;
29 pieces->push_back(cur);
30 cur.Begin = p+1;
31 }
32 }
33
34 cur.End = str.End;
35 if (cur.Begin <= cur.End)
36 {
37 pieces->push_back(cur);
38 }
39}
40
41void SplitAt(ConstStringRef str, char split_char, ConstStringRef * left, ConstStringRef * right)
42{

Callers 1

WebDebugConnectionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected