[#bsl-basic_string-0f3-copy] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0f3.adoc[basic_string<char32_t>]::copy :relfileprefix: ../../ :mrdocs: Copy from this string, starting from the optionally specified `position`, the specified `numChars` or `length() ‐ position` characters, whichever is smaller, into the specified `characterString` buffer, and return the number of characters copied. If `position` is not specified, 0 is used. Throw `out_of_range` if `position > length()`. The behavior is undefined unless `characterString` is at least `numChars` long. Note that the output `characterString` is _not_ null‐terminated. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0f3/size_type.adoc[size_type] copy( char32_t* characterString, xref:bsl/basic_string-0f3/size_type.adoc[size_type] numChars, xref:bsl/basic_string-0f3/size_type.adoc[size_type] position = 0) const; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#