MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / ends_with

Function ends_with

example/cacheHierarchy/fkYAML/node.hpp:2559–2563  ·  view source on GitHub ↗

@brief Checks if this character sequence ends with `sv` characters. @param sv The character sequence to compare with. @return true if the character sequence ends with `sv` characters, false otherwise.

Source from the content-addressed store, hash-verified

2557 /// @param sv The character sequence to compare with.
2558 /// @return true if the character sequence ends with `sv` characters, false otherwise.
2559 bool ends_with(basic_str_view sv) const noexcept {
2560 const size_type size = m_len;
2561 const size_type sv_size = sv.size();
2562 return size >= sv_size && traits_type::compare(end() - sv_size, sv.data(), sv_size) == 0;
2563 }
2564
2565 /// @brief Checks if this character sequence ends with `c` character.
2566 /// @param c The character to compare with.

Callers

nothing calls this directly

Calls 6

compareFunction · 0.85
endFunction · 0.85
emptyFunction · 0.85
backFunction · 0.85
basic_str_viewFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected