std::basic_string_view::copy
性病:基本[医]弦[医]意见:复制
size_type copy( CharT* dest, size_type count, size_type pos = 0) const; | | (since C++17) |
---|
复制子字符串[pos, pos + rcount)
指向的字符串dest
,在哪里rcount
是较小的count
和size() - pos
...
参数
dest | - | pointer to the destination character string |
---|---|---|
pos | - | position of the first character |
count | - | requested substring length |
返回值
复制的字符数。
例外
std::out_of_range如果pos > size()...
复杂性
线性在rcount
...
另见
substr | returns a substring (public member function) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。