BloombergLP::bdlb::String::copy

Return a newly allocated null-terminated copy of string.

Synopses

Declared in <bdlb_string.h>

Return a newly allocated null-terminated copy of string.

static
char*
copy(
    bsl::string const& string,
    bslma::Allocator* basicAllocator);
» more...

Return a newly allocated null-terminated copy of string.

static
char*
copy(
    char const* string,
    bslma::Allocator* basicAllocator);
» more...

Return a newly allocated null-terminated copy of string.

static
char*
copy(
    char const* string,
    int length,
    bslma::Allocator* basicAllocator);
» more...

Return Value

address of the newly allocated copy

Parameters

NameDescription
stringstring to copy
basicAllocatorallocator used to supply memory
lengthlength of string in bytes