Create an uninitialized string buffer and load a datum referring to it.

Synopsis

Declared in <bdld_datum.h>

static
char*
createUninitializedString(
    Datum* result,
    SizeType length,
    AllocatorType const& allocator);

Description

Load the specified result with a reference to a newly created character buffer of the specified length, using the specified allocator to supply memory, and return the address of this buffer. The behavior is undefined unless length <= UINT_MAX. Note that the caller is responsible for initializing the returned buffer with a UTF‐8 encoded string.

Return Value

the address of the uninitialized character buffer

Parameters

Name

Description

result

receives the datum that refers to the buffer

length

length of the character buffer in bytes

allocator

memory allocator to use

Created with MrDocs