Closed lo48576 closed 3 years ago
InlineString::remove()
String::remove()
idx
self.len()
self.char_indices().foo()
O(n)
str
O(1)
InlineString::remove()
seems not correct (at least it is inconsistent withString::remove()
).idx
argument which is equal toself.len()
.self.char_indices().foo()
for boundary check, but it isO(n)
operation.str
type has quite efficient (O(1)
) implementation.str
instead of iterators.