MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / split

Function split

src/base/string.cpp:22–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20namespace base {
21
22std::vector<std::string> split(const std::string& original, char delimiter)
23{
24 std::vector<std::string> output;
25 std::string::size_type prevPos = 0, pos = 0;
26
27 while ((pos = original.find(delimiter, pos)) != std::string::npos) {
28 output.emplace_back(original.substr(prevPos, pos - prevPos));
29 prevPos = ++pos;
30 }
31 output.emplace_back(original.substr(prevPos, pos - prevPos));
32
33 return output;
34}
35
36std::string string_to_lower(const std::string& original)
37{

Callers 3

open_fileFunction · 0.85
scanScriptMethod · 0.85
operateLoadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected