summaryrefslogtreecommitdiff
path: root/AK/StringView.h
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-05-28 00:51:43 +0430
committerAndreas Kling <kling@serenityos.org>2020-05-28 11:01:08 +0200
commitf9bf2c7e78e0a9b96d51a27039f28b3fb09b495f (patch)
tree188fbe7c8a3048235c6c1531c9f86a4f1a0be982 /AK/StringView.h
parentd83d46fd7a2574e3d55293f98d9f9d50a782e198 (diff)
downloadserenity-f9bf2c7e78e0a9b96d51a27039f28b3fb09b495f.zip
AK: Add StringView::split_view() taking a StringView
Since the task of splitting a string via another is pretty common, we might as well have this overload of split_view() as well.
Diffstat (limited to 'AK/StringView.h')
-rw-r--r--AK/StringView.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/AK/StringView.h b/AK/StringView.h
index 9ba07735b2..f6a06afcc5 100644
--- a/AK/StringView.h
+++ b/AK/StringView.h
@@ -88,6 +88,7 @@ public:
StringView substring_view(size_t start, size_t length) const;
Vector<StringView> split_view(char, bool keep_empty = false) const;
+ Vector<StringView> split_view(const StringView&, bool keep_empty = false) const;
// Create a Vector of StringViews split by line endings. As of CommonMark
// 0.29, the spec defines a line ending as "a newline (U+000A), a carriage