size_type copy(charT* s, size_type n, size_type pos = 0) const;
Requires: pos <= size()
Throws: out_of_range if pos > size().
Effects: Determines the effective length rlen of the string to copy as the smaller of n and size() - pos. s shall designate an array of at least rlen elements.
The function then replaces the string designated by s with a string of length rlen whose elements are a copy of the string controlled by *this beginning at position pos.
The function does not append a null object to the string designated by s.
Returns: rlen.