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

Method ends_with

include/stringzilla/stringzilla.hpp:2096–2099  ·  view source on GitHub ↗

@brief Checks if the string ends with the other string. */

Source from the content-addressed store, hash-verified

2094
2095 /** @brief Checks if the string ends with the other string. */
2096 bool ends_with(string_view other) const noexcept {
2097 return length_ >= other.size() &&
2098 sz_equal(start_ + length_ - other.size(), other.data(), other.size()) == sz_true_k;
2099 }
2100
2101 /** @brief Checks if the string ends with the other string. */
2102 bool ends_with(const_pointer other) const noexcept {

Callers

nothing calls this directly

Calls 3

sz_equalFunction · 0.70
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected