util/IterableSplitString: use StringView::Split()
This commit is contained in:
parent
aadd32c973
commit
0173d3b313
@ -76,16 +76,9 @@ public:
|
|||||||
if (rest == nullptr)
|
if (rest == nullptr)
|
||||||
current = nullptr;
|
current = nullptr;
|
||||||
else {
|
else {
|
||||||
const auto *i = rest.Find(separator);
|
const auto [a, b] = rest.Split(separator);
|
||||||
if (i == nullptr) {
|
current = a;
|
||||||
current = rest;
|
rest = b;
|
||||||
rest.data = nullptr;
|
|
||||||
} else {
|
|
||||||
current.data = rest.data;
|
|
||||||
current.size = i - current.data;
|
|
||||||
rest.size -= current.size + 1;
|
|
||||||
rest.data = i + 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user