xo-object2: + DString::from_view()

This commit is contained in:
Roland Conybeare 2026-01-15 19:37:32 -05:00
commit d87caecce8
3 changed files with 50 additions and 0 deletions

View file

@ -72,6 +72,12 @@ namespace xo {
static DString * from_cstr(obj<AAllocator> mm,
const char * cstr);
/** create string containing a copy of @p sv.
* Use memory from allocator @p mm
**/
static DString * from_view(obj<AAllocator> mm,
std::string_view sv);
/** clone existing string **/
static DString * clone(obj<AAllocator> mm,
const DString * src);