diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-12-09 20:05:43 +0330 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-12-11 20:44:54 +0330 |
commit | 099a6bc45f9dd091e306809f9510a41968070c5c (patch) | |
tree | e60401e8c75a2a9113ad709020a9b7f8bc3bd6bf /AK | |
parent | 7a17fd6d71d7fb5d4963147af96e0258cad32393 (diff) | |
download | serenity-099a6bc45f9dd091e306809f9510a41968070c5c.zip |
AK: Give DeprecatedString::replace() a default mode
This is used in Jakt, and providing that value from Jakt's side is more
trouble than doing this.
Considering this class is bound to go away, a little
backwards-compatible API change is just fine.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/DeprecatedString.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/DeprecatedString.h b/AK/DeprecatedString.h index c7e4aad728..75cc762e0f 100644 --- a/AK/DeprecatedString.h +++ b/AK/DeprecatedString.h @@ -299,7 +299,7 @@ public: return { characters(), length() }; } - [[nodiscard]] DeprecatedString replace(StringView needle, StringView replacement, ReplaceMode replace_mode) const { return StringUtils::replace(*this, needle, replacement, replace_mode); } + [[nodiscard]] DeprecatedString replace(StringView needle, StringView replacement, ReplaceMode replace_mode = ReplaceMode::All) const { return StringUtils::replace(*this, needle, replacement, replace_mode); } [[nodiscard]] size_t count(StringView needle) const { return StringUtils::count(*this, needle); } [[nodiscard]] DeprecatedString reverse() const; |