std::basic_string_view::at
constexpr const_reference at(size_type pos) const; | | (since C++17) |
|---|
返回对指定位置的字符的引用。pos执行边界检查,类型除外std::out_of_range将引发无效访问。
参数
pos | - | position of the character to return |
|---|
返回值
引用请求的字符。
例外
抛出std::out_of_range如果pos >= size()...
复杂性
常量。
另见
operator[] | access specified character (public member function) |
|---|
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

