Add StringBuilder::ToStringView()

This commit is contained in:
Wojtek Figat
2021-02-27 00:00:28 +01:00
parent 86c1823d4a
commit bcf86d9d9f
2 changed files with 8 additions and 0 deletions

View File

@@ -269,6 +269,8 @@ public:
{
return String(_data.Get(), _data.Count());
}
StringView ToStringView() const;
};
inline uint32 GetHash(const StringBuilder& key)

View File

@@ -2,6 +2,12 @@
#include "StringView.h"
#include "String.h"
#include "StringBuilder.h"
StringView StringBuilder::ToStringView() const
{
return StringView(_data.Get(), _data.Count());
}
StringView StringView::Empty;