Core: String::Make

This commit is contained in:
Mirek Fidler 2021-09-13 08:59:05 +02:00
parent 9458f03c96
commit 54226f44d3
6 changed files with 278 additions and 4 deletions

View file

@ -404,6 +404,9 @@ public:
template <class Maker>
static String MakeSmall(Maker m) { String s; int n = m(s.chr); ASSERT(n <= 14); s.SLen() = n; s.Dsyn(); return s; }
template <class Maker>
static String Make(int alloc, Maker m);
};
inline std::string to_string(const String& s) { return std::string(s.Begin(), s.End()); }