std::experimental::basic_string_view<CharT,Traits>::substr
来自 cppreference.cn
< cpp | experimental | basic string view
constexpr basic_string_view substr(size_type pos = 0, size_type count = npos ) const; |
||
返回子字符串 [pos, pos + rcount)
的视图,其中 rcount
是 count
和 size() - pos 中较小的值。
内容 |
[edit] 参数
pos | - | 第一个字符的位置 |
count | - | 请求的长度 |
[edit] 返回值
子字符串 [pos, pos + rcount)
的视图。
[edit] 异常
std::out_of_range 如果 pos > size()
[edit] 复杂度
常数。
[edit] 参见
复制字符 (public member function) | |
在视图中查找字符 (public member function) |