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

Method rfind

include/stringzilla/stringzilla.hpp:2164–2167  ·  view source on GitHub ↗

* @brief Find the last occurrence of a substring. * @return The offset of the first character of the match, or `npos` if not found. */

Source from the content-addressed store, hash-verified

2162 * @return The offset of the first character of the match, or `npos` if not found.
2163 */
2164 size_type rfind(string_view other) const noexcept {
2165 auto ptr = sz_rfind(start_, length_, other.data(), other.size());
2166 return ptr ? ptr - start_ : npos;
2167 }
2168
2169 /**
2170 * @brief Find the last occurrence of a substring, within first `until` characters.

Callers

nothing calls this directly

Calls 6

rfindFunction · 0.85
sz_rfindFunction · 0.70
sz_rfind_byteFunction · 0.70
dataMethod · 0.45
sizeMethod · 0.45
rfindMethod · 0.45

Tested by

no test coverage detected