diff options
author | Agustin Gianni <agustingianni@gmail.com> | 2022-12-15 21:20:14 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-12-20 11:24:05 +0100 |
commit | 9a2ee5a9dd792359440429832ac564f5dde2b315 (patch) | |
tree | 67c9dd0da0dd670a860978c3abf2db38ffe6af6a /AK/StringUtils.h | |
parent | 03107d402808045bdadc0edf3d66e960dd37b967 (diff) | |
download | serenity-9a2ee5a9dd792359440429832ac564f5dde2b315.zip |
AK: Add DeprecatedString::find_last(StringView)
This adds the the method DeprecatedString::find_last() as wrapper for
StringUtils::find_last for the StringView type.
Diffstat (limited to 'AK/StringUtils.h')
-rw-r--r-- | AK/StringUtils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/AK/StringUtils.h b/AK/StringUtils.h index 173d8c941b..8f7fb2f490 100644 --- a/AK/StringUtils.h +++ b/AK/StringUtils.h @@ -90,6 +90,7 @@ StringView trim_whitespace(StringView string, TrimMode mode); Optional<size_t> find(StringView haystack, char needle, size_t start = 0); Optional<size_t> find(StringView haystack, StringView needle, size_t start = 0); Optional<size_t> find_last(StringView haystack, char needle); +Optional<size_t> find_last(StringView haystack, StringView needle); Optional<size_t> find_last_not(StringView haystack, char needle); Vector<size_t> find_all(StringView haystack, StringView needle); enum class SearchDirection { |