MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / split

Method split

source/util/bstring.cpp:512–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510}
511
512void BString::split(char c, std::vector<BString>& results) const {
513 if (!isEmpty()) {
514 char* s = data->str;
515 char* p = s;
516
517 while ((p = strchr(s, c))) {
518 int startIndex = (int)(s - data->str);
519 int stopIndex = (int)(p - data->str);
520 results.push_back(this->substr(startIndex, stopIndex - startIndex));
521 s = p + 1;
522 }
523 results.push_back(BString::copy(s));
524 }
525}
526
527void BString::split(const char* c, std::vector<BString>& results) const {
528 if (!isEmpty()) {

Callers 15

walkStackMethod · 0.45
glcommon_glGetStringFunction · 0.45
splitPathMethod · 0.45
makeNativeDirsMethod · 0.45
applyMethod · 0.45
parseStartupArgsMethod · 0.45
lookForFileSystemsMethod · 0.45
FileSystemZipMethod · 0.45
loadMethod · 0.45
getWindowsVersionMethod · 0.45
getTinyCorePackagesMethod · 0.45
AppFileMethod · 0.45

Calls 2

substrMethod · 0.95
push_backMethod · 0.45

Tested by

no test coverage detected