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

Function ContainsSubString

common/StringUtil.h:333–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331
332 template <typename ContainerType>
333 static inline bool ContainsSubString(const ContainerType& haystack, const std::string_view needle)
334 {
335 using ValueType = typename ContainerType::value_type;
336 if (needle.empty())
337 return std::empty(haystack);
338
339 return std::search(std::begin(haystack), std::end(haystack), reinterpret_cast<const ValueType*>(needle.data()),
340 reinterpret_cast<const ValueType*>(needle.data() + needle.length())) != std::end(haystack);
341 }
342} // namespace StringUtil

Callers 1

CheckDiskTypeFSFunction · 0.85

Calls 6

emptyFunction · 0.50
beginFunction · 0.50
endFunction · 0.50
emptyMethod · 0.45
dataMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected