MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / splitString

Method splitString

src/csvdatastorage.cpp:418–432  ·  view source on GitHub ↗

splitString() Splits the given string at the defined internal CSV delimiter */

Source from the content-addressed store, hash-verified

416 Splits the given string at the defined internal CSV delimiter
417 */
418std::vector<std::string> CsvDataStorage::splitString(std::string str) {
419 std::vector<std::string> splitted;
420 std::string tempStr = "";
421 size_t str_size = str.size();
422 for( size_t i = 0; i < str_size; ++i ) {
423 if( static_cast<unsigned char>(str[i]) != CsvDataStorage::TCRUNCHER_UTF_8_DELIMITER ) {
424 tempStr.push_back(str[i]);
425 } else {
426 splitted.push_back(tempStr);
427 tempStr = "";
428 }
429 }
430 splitted.push_back(tempStr);
431 return splitted;
432}
433
434
435/**

Callers

nothing calls this directly

Calls 2

push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected