Code:std::vector<std::wstring> split( const std::wstring& text, wchar_t delimiter )
{
std::vector<std::wstring> result;
std::wstring::size_type start = 0;
std::wstring::size_type end = text.find( delimiter, start );
while( end != wstring::npos )
{
std::wstring token = text.substr( start, end - start );
result.push_back( token );
start = end + 1;
end = text.find( delimiter, start );
}
result.push_back( text.substr( start ) );
return result;
}