1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:37:36 +00:00

AK: Add String::find_all() and String::count()

This commit is contained in:
Maciej Zygmanowski 2021-05-19 13:29:23 +02:00 committed by Linus Groh
parent e9898a6031
commit 80077cea86
3 changed files with 56 additions and 6 deletions

View file

@ -262,6 +262,8 @@ public:
[[nodiscard]] StringView view() const;
int replace(const String& needle, const String& replacement, bool all_occurrences = false);
size_t count(const String& needle) const;
Vector<size_t> find_all(const String& needle) const;
[[nodiscard]] String reverse() const;
template<typename T, typename... Rest>