Return a datum owning a copy of the string described by value.
Synopsis
Declared in <bdld_datum.h>
static
Datum
copyString(
bslstl::StringRef const& value,
AllocatorType const& allocator);
Description
Return, by value, a datum having the copy of the specified StringRef value, using the specified allocator to supply memory (if needed). The behavior is undefined unless value.length() <= UINT_MAX. Note that the copied string is owned, and will be freed if Datum::destroy is called on the returned object.
Return Value
a datum owning a copy of the string described by value
Parameters
Name |
Description |
value |
string to copy |
allocator |
memory allocator to use |
Created with MrDocs