summaryrefslogtreecommitdiff
path: root/Source/Core/Common/StringUtil.cpp
diff options
context:
space:
mode:
authorLioncash <mai.iam2048@gmail.com>2023-01-24 16:55:41 -0500
committerLioncash <mai.iam2048@gmail.com>2023-01-24 16:55:43 -0500
commit1d03835c5dd00dbc855f3afbbad7b21ee2919929 (patch)
tree67f345d3800d33956782c399b37b19d85b3f52fd /Source/Core/Common/StringUtil.cpp
parent4b2c00e239f44e79190cc156e4557ea4aaf64bd2 (diff)
StringUtil: Make StringUTF8CodePointCount take string_view
There's nothing really about this that would need to constrain it to only std::string instances.
Diffstat (limited to 'Source/Core/Common/StringUtil.cpp')
-rw-r--r--Source/Core/Common/StringUtil.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp
index 1bfb54e9f9..1277a18f72 100644
--- a/Source/Core/Common/StringUtil.cpp
+++ b/Source/Core/Common/StringUtil.cpp
@@ -437,7 +437,7 @@ void StringPopBackIf(std::string* s, char c)
s->pop_back();
}
-size_t StringUTF8CodePointCount(const std::string& str)
+size_t StringUTF8CodePointCount(std::string_view str)
{
return str.size() -
std::count_if(str.begin(), str.end(), [](char c) -> bool { return (c & 0xC0) == 0x80; });