From 9855a222e0d38dce164ed5514468f54fcf701a7e Mon Sep 17 00:00:00 2001 From: Stenzek Date: Tue, 12 Sep 2023 23:42:46 +1000 Subject: [PATCH] Common: Add String::ToStdString() --- src/common/string.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/string.h b/src/common/string.h index 10add5ad5..32de851f2 100644 --- a/src/common/string.h +++ b/src/common/string.h @@ -249,6 +249,10 @@ public: { return IsEmpty() ? std::string_view() : std::string_view(GetCharArray(), GetLength()); } + std::string ToStdString() const + { + return std::string(GetStringView()); + } // creates a new string from the specified format static String FromFormat(const char* FormatString, ...) printflike(1, 2);