MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / ofSplitString

Function ofSplitString

Source/OpenFrameworksPort.cpp:484–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482}
483
484std::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
503bool ofIsStringInString(const std::string& haystack, const std::string& needle)
504{

Callers 15

GetLinePosMethod · 0.85
oscMessageReceivedMethod · 0.85
ReadMethod · 0.85
FilesDroppedMethod · 0.85
ReadEchonestLineMethod · 0.85
UpdatePrefabNameMethod · 0.85
GetLinesMethod · 0.85
FindModuleMethod · 0.85
FindUIControlMethod · 0.85
DrawStringMethod · 0.85
LoadHelpMethod · 0.85
LoadTooltipsMethod · 0.85

Calls 1

StringClass · 0.85

Tested by

no test coverage detected