12 std::vector<std::wstring>
split(
const wchar_t* pszString,
const wchar_t* splitChars)
14 std::vector<std::wstring> items;
15 if (splitChars == NULL || *splitChars == L
'\0')
20 const wchar_t* workPtr = pszString;
23 size_t foundIndex = wcscspn(workPtr, splitChars);
24 if (foundIndex < wcslen(workPtr))
26 items.push_back(std::wstring(workPtr, 0, foundIndex));
27 workPtr += foundIndex + 1;
31 items.push_back(std::wstring(workPtr));
38 std::vector<std::wstring>
split(
const std::wstring& szString,
39 const std::wstring& splitChars)
41 return split(szString.c_str(), splitChars.c_str());
Declaration of the split functions, for splitting a string on delimiters.
The namespace containing all the "helper" functions in the C++ code.
std::vector< std::string > split(const char *pszString, const char *splitChars)
Split the given string into a list of strings given the character on which to split....