std::experimental::basic_string_view<CharT,Traits>::substr
來自 cppreference.com
< 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 中的較小者。
目錄 |
[編輯] 引數
pos | - | 首字元的位置 |
count | - | 請求的長度 |
[編輯] 返回值
子字串 [pos, pos + rcount)
的檢視。
[編輯] 異常
若 pos > size() 則丟擲 std::out_of_range
[編輯] 複雜度
常數時間。
[編輯] 參閱
複製字元 (public member function) | |
在檢視中查詢字元 (public member function) |