diff --git a/AK/String.h b/AK/String.h index b7d1da910f..e213ec3ebb 100644 --- a/AK/String.h +++ b/AK/String.h @@ -284,7 +284,7 @@ public: } int replace(const String& needle, const String& replacement, bool all_occurrences = false); - size_t count(const String& needle) const; + [[nodiscard]] size_t count(const String& needle) const; [[nodiscard]] String reverse() const; template