MCPcopy Create free account
hub / github.com/Aleksoid1978/VideoRenderer / str_split

Function str_split

Source/Utils/StringUtil.cpp:11–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include "StringUtil.h"
10
11void str_split(const std::string& str, std::vector<std::string>& tokens, char delim)
12{
13 std::istringstream iss(str);
14 std::string tmp;
15 while (std::getline(iss, tmp, delim)) {
16 if (tmp.size()) {
17 tokens.push_back(tmp);
18 }
19 }
20}
21
22void str_split(const std::wstring& wstr, std::vector<std::wstring>& tokens, wchar_t delim)
23{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected