MCPcopy Create free account
hub / github.com/FastLED/FastLED / ends_with

Method ends_with

src/fl/stl/basic_string.cpp.hpp:727–732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

725}
726
727bool basic_string::ends_with(const char* suffix) const {
728 if (!suffix) return true;
729 fl::size suffix_len = fl::strlen(suffix);
730 if (suffix_len > mLength) return false;
731 return fl::strncmp(c_str() + mLength - suffix_len, suffix, suffix_len) == 0;
732}
733
734bool basic_string::starts_with(char c) const { return mLength > 0 && c_str()[0] == c; }
735bool basic_string::starts_with(const basic_string& prefix) const { return starts_with(prefix.c_str()); }

Callers 15

is_cpp_like_pathFunction · 0.45
ends_with_anyFunction · 0.45
is_excluded_fileFunction · 0.45
is_std_bridge_fileFunction · 0.45
find_ctype_callsFunction · 0.45
top_level_headersFunction · 0.45
classify_noexcept_lineFunction · 0.45
signature_has_noexceptFunction · 0.45

Calls 3

strlenFunction · 0.85
strncmpFunction · 0.85
c_strMethod · 0.45

Tested by 1