std::basic_string::operator basic_string_view

From cppreference.com
< cpp‎ | string‎ | basic string
 
 
 
std::basic_string
 
operator std::basic_string_view<CharT, Traits>() const;

Returns a std::basic_string_view, constructed as if by std::basic_string_view<CharT, Traits>(data(), size())

Parameters

(none)

Return value

A string view representing the entire contents of the string.

Exceptions

noexcept specification:  
noexcept
  

Example

See also

constructs a basic_string_view
(public member function of std::basic_string_view)