Delete redundant function rtc::tokenize_with_empty_tokens
It was identical to rtc::split. Bug: webrtc:6424 Change-Id: I1118ad34050c0eb324ade347c97174f3ad4b39a7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231234 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/main@{#34946}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
4f0a9194d9
commit
634f27950e
@ -171,21 +171,6 @@ size_t tokenize(const std::string& source,
|
||||
return fields->size();
|
||||
}
|
||||
|
||||
size_t tokenize_with_empty_tokens(const std::string& source,
|
||||
char delimiter,
|
||||
std::vector<std::string>* fields) {
|
||||
fields->clear();
|
||||
size_t last = 0;
|
||||
for (size_t i = 0; i < source.length(); ++i) {
|
||||
if (source[i] == delimiter) {
|
||||
fields->push_back(source.substr(last, i - last));
|
||||
last = i + 1;
|
||||
}
|
||||
}
|
||||
fields->push_back(source.substr(last, source.length() - last));
|
||||
return fields->size();
|
||||
}
|
||||
|
||||
bool tokenize_first(const std::string& source,
|
||||
const char delimiter,
|
||||
std::string* token,
|
||||
|
||||
Reference in New Issue
Block a user