W3cubDocs

/C++

std::basic_string::operator basic_string_view

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)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/string/basic_string/operator_basic_string_view