string::subview
Return a view.
Synopsis
string_view
subview(
std::size_t pos,
std::size_t count = string::npos) const; (1)
string_view
subview() const noexcept; (2)
Description
Returns a view of a substring.
Exception Safety
Strong guarantee.
Return Value
this->subview().substr(pos, count)
Return Value
string_view(this->data(), this->size())
.
Parameters
Name | Description |
---|---|
|
The index to being the substring at. The default argument for this parameter is |
|
The length of the substring. The default argument for this parameter is |
Exceptions
Type | Thrown On |
---|---|
|
|