[#BloombergLP-bdlb-String-copy-0d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/String.adoc[String]::copy :relfileprefix: ../../../ :mrdocs: Create a null‐terminated copy of the specified `string`, using the specified `basicAllocator` to supply memory, and return the address of the newly‐created modifiable string. The string that is returned is owned by the caller. The behavior is undefined unless `string.size() <= INT_MAX` and `basicAllocator` is non‐null. Note that if `string` contains any embedded null ('0') characters they will be propagated to the copy. == Synopsis Declared in `<bdlb_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* copy( xref:bsl/string.adoc[bsl::string] const& string, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#