diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp
index a2f3cd424912f7aa69f063654402b5703aea8885..298b727496c3f0865f9b23f31124346290de7c44 100644
--- a/indra/llcommon/llstring.cpp
+++ b/indra/llcommon/llstring.cpp
@@ -716,7 +716,7 @@ std::string utf8str_removeCRLF(const std::string& utf8str)
     return out;
 }
 
-llwchar utf8str_to_wchar(const std::string& utf8str, size_t offset, size_t length)
+llwchar utf8str_to_wchar(std::string_view utf8str, size_t offset, size_t length)
 {
     switch (length)
     {
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 3d72baa880bc84a9878c56e44746b1c385efe20a..460b9dd9199074e0e8067b986d4191b3be3b4024 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -777,7 +777,7 @@ LL_COMMON_API std::string mbcsstring_makeASCII(const std::string& str);
 
 LL_COMMON_API std::string utf8str_removeCRLF(const std::string& utf8str);
 
-LL_COMMON_API llwchar utf8str_to_wchar(const std::string& utf8str, size_t offset, size_t length);
+LL_COMMON_API llwchar utf8str_to_wchar(std::string_view utf8str, size_t offset, size_t length);
 
 LL_COMMON_API std::string utf8str_showBytesUTF8(const std::string& utf8str);