首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

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是较小的countsize() - 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)

代码语言:txt
复制
 © cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券