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

Method remove_prefix

include/stringzilla/stringzilla.hpp:3010–3013  ·  view source on GitHub ↗

* @brief Removes the first `n` characters from the view. * @warning The behavior is @b undefined if `n > size()`. */

Source from the content-addressed store, hash-verified

3008 * @warning The behavior is @b undefined if `n > size()`.
3009 */
3010 void remove_prefix(size_type n) noexcept {
3011 assert(n <= size());
3012 sz_string_erase(&string_, 0, n);
3013 }
3014
3015 /**
3016 * @brief Removes the last `n` characters from the view.

Callers 3

test_searchFunction · 0.45
iteratorMethod · 0.45
iteratorClass · 0.45

Calls 1

sz_string_eraseFunction · 0.85

Tested by 1

test_searchFunction · 0.36