MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / erase

Method erase

include/stringzilla/stringzilla.hpp:3574–3579  ·  view source on GitHub ↗

* @brief Erases ( @b in-place ) the given range of characters. * @return Iterator pointing following the erased character, or end() if no such character exists. */

Source from the content-addressed store, hash-verified

3572 * @return Iterator pointing following the erased character, or end() if no such character exists.
3573 */
3574 iterator erase(const_iterator first, const_iterator last) noexcept sz_lifetime_bound_ {
3575 auto start = begin();
3576 auto offset = first - start;
3577 sz_string_erase(&string_, offset, last - first);
3578 return start + offset;
3579 }
3580
3581 /**
3582 * @brief Erases @b (in-place) the one character at a given position.

Callers 4

test_updatesFunction · 0.80
randomize_stringsFunction · 0.80
build_environmentFunction · 0.80

Calls 1

sz_string_eraseFunction · 0.85

Tested by 3

test_updatesFunction · 0.64
randomize_stringsFunction · 0.64