MCPcopy Create free account
hub / github.com/changeofpace/VivienneVMM / StrSplitStringByDelimiter

Function StrSplitStringByDelimiter

VivienneCL/string_util.cpp:176–198  ·  view source on GitHub ↗

============================================================================= Tokenizer Interface =============================================================================

Source from the content-addressed store, hash-verified

174// Tokenizer Interface
175//=============================================================================
176_Use_decl_annotations_
177SIZE_T
178StrSplitStringByDelimiter(
179 CHAR Delimiter,
180 const std::string& Input,
181 std::vector<std::string>& Output
182)
183{
184 std::string Token = {};
185 std::stringstream Stream(Input);
186
187 //
188 // Zero out parameters.
189 //
190 Output.clear();
191
192 while (std::getline(Stream, Token, Delimiter))
193 {
194 Output.emplace_back(Token);
195 }
196
197 return Output.size();
198}
199
200
201_Use_decl_annotations_

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected