MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ends_with

Method ends_with

common/SmallString.cpp:637–646  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635}
636
637bool SmallStringBase::ends_with(const char* str, bool case_sensitive) const
638{
639 const u32 other_length = static_cast<u32>(std::strlen(str));
640 if (other_length > m_length)
641 return false;
642
643 u32 start_offset = m_length - other_length;
644 return (case_sensitive) ? (std::strncmp(str, m_buffer + start_offset, other_length) == 0) :
645 (CASE_N_COMPARE(str, m_buffer + start_offset, other_length) == 0);
646}
647
648bool SmallStringBase::ends_with(const SmallStringBase& str, bool case_sensitive) const
649{

Callers 7

parseAndInsertMethod · 0.80
ParseKeyStringMethod · 0.80
ParseKeyStringMethod · 0.80
OpenMethod · 0.80
CloseMethod · 0.80
GetOSVersionStringFunction · 0.80

Calls 2

lengthMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected