splitString() Splits the given string at the defined internal CSV delimiter */
| 416 | Splits the given string at the defined internal CSV delimiter |
| 417 | */ |
| 418 | std::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 | /** |