summaryrefslogtreecommitdiff
path: root/src/string.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2014-04-18 13:45:33 +0100
committerMaxime Coste <frrrwww@gmail.com>2014-04-18 13:47:39 +0100
commitaf2d82dfc17ccd0c32b0955b1588e3bca379ccab (patch)
tree8d7eb1b2f3ad6015b415646a4491250466df0635 /src/string.cc
parenta7e6e5b9362e961cd3c6a3ad29b2bd061a41b0d9 (diff)
Add StringView class for non owning string
Diffstat (limited to 'src/string.cc')
-rw-r--r--src/string.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string.cc b/src/string.cc
index 23457413..46d492f1 100644
--- a/src/string.cc
+++ b/src/string.cc
@@ -83,7 +83,7 @@ void option_from_string(const String& str, Regex& re)
}
}
-bool prefix_match(const String& str, const String& prefix)
+bool prefix_match(StringView str, StringView prefix)
{
auto it = str.begin();
for (auto& c : prefix)
@@ -94,7 +94,7 @@ bool prefix_match(const String& str, const String& prefix)
return true;
}
-bool subsequence_match(const String& str, const String& subseq)
+bool subsequence_match(StringView str, StringView subseq)
{
auto it = str.begin();
for (auto& c : subseq)