diff --git a/kernel/rtlil.h b/kernel/rtlil.h index 85e89686e..b6104e0e5 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -416,8 +416,8 @@ struct RTLIL::IdString return compare(sz - suffix.size(), suffix.size(), suffix.data()) == 0; } - bool contains(const char* str) const { - return strstr(c_str(), str); + bool contains(std::string_view s) const { + return std::string_view(c_str()).find(s) != std::string::npos; } size_t size() const {