string::copy
Copy a substring to another string.
Synopsis
std::size_t
copy(
char* dest,
std::size_t count,
std::size_t pos = 0) const;
Description
Copies std::min(count, size() - pos)
characters starting at index pos
to the string pointed to by dest
.
The resulting string is not null terminated. |
Return Value
The number of characters copied.
Parameters
Name | Description |
---|---|
|
The number of characters to copy. |
|
The string to copy to. |
|
The index to begin copying from. The default argument for this parameter is |
Exceptions
Type | Thrown On |
---|---|
|
|