|
@@ -282,17 +282,13 @@ public:
|
|
|
Vector<size_t> find_all(const String& needle) const;
|
|
|
[[nodiscard]] String reverse() const;
|
|
|
|
|
|
- template<typename T, typename... Rest>
|
|
|
- [[nodiscard]] bool is_one_of(const T& string, Rest... rest) const
|
|
|
+ template<typename... Ts>
|
|
|
+ [[nodiscard]] ALWAYS_INLINE constexpr bool is_one_of(Ts... strings) const
|
|
|
{
|
|
|
- if (*this == string)
|
|
|
- return true;
|
|
|
- return is_one_of(rest...);
|
|
|
+ return (... || this->operator==(forward<Ts>(strings)));
|
|
|
}
|
|
|
|
|
|
private:
|
|
|
- [[nodiscard]] bool is_one_of() const { return false; }
|
|
|
-
|
|
|
RefPtr<StringImpl> m_impl;
|
|
|
};
|
|
|
|