MCPcopy Create free account
hub / github.com/clechasseur/pathcopycopy / Split

Method Split

PathCopyCopy/src/StringUtils.cpp:80–93  ·  view source on GitHub ↗

Splits the given string using the given separators into parts. @param p_String String to split. @param p_Separators Separators to use for splitting. @return String parts.

Source from the content-addressed store, hash-verified

78// @return String parts.
79//
80PCC::WStringV StringUtils::Split(std::wstring p_String,
81 const std::wstring& p_Separators)
82{
83 PCC::WStringV vParts;
84 if (!p_String.empty()) {
85 wchar_t* context = nullptr;
86 wchar_t* pCurToken = ::wcstok_s(&*p_String.begin(), p_Separators.c_str(), &context);
87 while (pCurToken != nullptr) {
88 vParts.emplace_back(pCurToken);
89 pCurToken = ::wcstok_s(nullptr, p_Separators.c_str(), &context);
90 }
91 }
92 return vParts;
93}
94
95//
96// Splits the given string using the given separator into parts.

Callers 2

LoadPluginsFromValueMethod · 0.80
LoadPipelinePluginsMethod · 0.80

Calls 2

emptyMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected