MCPcopy Create free account
hub / github.com/cuberite/cuberite / StringSplit

Function StringSplit

src/StringUtils.cpp:124–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122
123
124AStringVector StringSplit(const AString & str, const AString & delim)
125{
126 AStringVector results;
127 size_t cutAt = 0;
128 size_t Prev = 0;
129 while ((cutAt = str.find_first_of(delim, Prev)) != str.npos)
130 {
131 results.push_back(str.substr(Prev, cutAt - Prev));
132 Prev = cutAt + 1;
133 }
134 if (Prev < str.length())
135 {
136 results.push_back(str.substr(Prev));
137 }
138 return results;
139}
140
141
142

Callers 15

AddToMapMethod · 0.85
LoadRecipesMethod · 0.85
AddRecipeLineMethod · 0.85
ParseItemMethod · 0.85
ParseIngredientMethod · 0.85
AddFromStringMethod · 0.85
ExecuteConsoleCommandMethod · 0.85
CheckUsersMethod · 0.85
GetPageMethod · 0.85
GetBaseURLMethod · 0.85
tolua_StringSplitFunction · 0.85
GetTabNameForRequestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected