Common: Add String::ToStdString()

This commit is contained in:
Stenzek 2023-09-12 23:42:46 +10:00
parent 631d1e7433
commit 9855a222e0
1 changed files with 4 additions and 0 deletions

View File

@ -249,6 +249,10 @@ public:
{ {
return IsEmpty() ? std::string_view() : std::string_view(GetCharArray(), GetLength()); 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 // creates a new string from the specified format
static String FromFormat(const char* FormatString, ...) printflike(1, 2); static String FromFormat(const char* FormatString, ...) printflike(1, 2);