std::basic_string_view<CharT,Traits>::
front
<
cpp
|
string
|
basic string view
constexpr
const_reference front
(
)
const
;
(C++17 起)
返回到视图首字符的引用。若
empty
(
)
==
true
则行为未定义。
参数
(无)
返回值
到首字符的引用,等价于
operator
[
]
(
0
)
。
复杂度
常数。
参阅
back
访问最末字符
(公开成员函数)
empty
检查视图是否为空
(公开成员函数)