MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / Split

Method Split

cpp/iedriver/StringUtilities.cpp:183–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183void StringUtilities::Split(const std::string& input,
184 const std::string& delimiter,
185 std::vector<std::string>* tokens) {
186 std::string input_copy = input;
187 while (input_copy.size() > 0) {
188 size_t delimiter_pos = input_copy.find(delimiter);
189 std::string token = input_copy.substr(0, delimiter_pos);
190 if (delimiter_pos == std::string::npos) {
191 input_copy = "";
192 } else {
193 input_copy = input_copy.substr(delimiter_pos + delimiter.size());
194 }
195 tokens->push_back(token);
196 }
197}
198
199void StringUtilities::Split(const std::wstring& input,
200 const std::wstring& delimiter,

Calls 2

findMethod · 0.80
sizeMethod · 0.45