| 482 | } |
| 483 | |
| 484 | std::vector<std::string> ofSplitString(std::string str, std::string splitter, bool ignoreEmpty, bool trim) |
| 485 | { |
| 486 | StringArray tokens; |
| 487 | |
| 488 | tokens.addTokens(String(str), String(splitter), ""); |
| 489 | |
| 490 | if (ignoreEmpty) |
| 491 | tokens.removeEmptyStrings(); |
| 492 | |
| 493 | if (trim) |
| 494 | tokens.trim(); |
| 495 | |
| 496 | std::vector<std::string> ret; |
| 497 | for (auto s : tokens) |
| 498 | ret.push_back(s.toStdString()); |
| 499 | |
| 500 | return ret; |
| 501 | } |
| 502 | |
| 503 | bool ofIsStringInString(const std::string& haystack, const std::string& needle) |
| 504 | { |
no test coverage detected