xo-object2: + StringOps + utest
This commit is contained in:
parent
f02e550f8c
commit
3349cea289
4 changed files with 92 additions and 1 deletions
36
xo-object2/include/xo/object2/StringOps.hpp
Normal file
36
xo-object2/include/xo/object2/StringOps.hpp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/** @file StringOps.hpp
|
||||
*
|
||||
* @author Roland Conybeare, Jan 2026
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "string/IGCObject_DString.hpp"
|
||||
#include "DString.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace scm {
|
||||
/** @brief string functions
|
||||
*
|
||||
* note: separate from DString
|
||||
**/
|
||||
struct StringOps {
|
||||
using AGCObject = xo::mm::AGCObject;
|
||||
using AAllocator = xo::mm::AAllocator;
|
||||
using size_type = DString::size_type;
|
||||
|
||||
template <typename AFacet = AGCObject>
|
||||
static obj<AFacet,DString> empty(obj<AAllocator> mm,
|
||||
size_type cap);
|
||||
};
|
||||
|
||||
template <typename AFacet>
|
||||
obj<AFacet,DString>
|
||||
StringOps::empty(obj<AAllocator> mm, size_type cap)
|
||||
{
|
||||
return obj<AFacet,DString>(DString::empty(mm, cap));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* end StringOps.hpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue