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

Method find

include/stringzilla/stringzilla.hpp:2136–2139  ·  view source on GitHub ↗

* @brief Find the first occurrence of a substring, skipping the first `skip` characters. * @return The offset of the first character of the match, or `npos` if not found. * @warning The behavior is @b undefined if `skip > size()`. */

Source from the content-addressed store, hash-verified

2134 * @warning The behavior is @b undefined if `skip > size()`.
2135 */
2136 size_type find(string_view other, size_type skip = 0) const noexcept {
2137 auto ptr = sz_find(start_ + skip, length_ - skip, other.data(), other.size());
2138 return ptr ? ptr - start_ : npos;
2139 }
2140
2141 /**
2142 * @brief Find the first occurrence of a character, skipping the first `skip` characters.

Callers

nothing calls this directly

Calls 5

findFunction · 0.85
sz_findFunction · 0.70
sz_find_byteFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected