std::basic_string_view - cppreference.com

en.cppreference.com/cpp/string/basic_string_view
The class template basic_string_view describes an object that can refer to a constant contiguous sequence of CharT with the first element of the sequence at position zero. For a basic_string_view str, pointers, iterators, and references to elements of str are invalidated when an operation invalidates a pointer in the range [str.data(), str.data() + str.size()).

operator==,!=,<,<=,>,>=,<=> (std::basic_string_view) - cppreference.com

en.cppreference.com/cpp/string/basic_string_view/operator_cmp
Compares two views. All comparisons are done via the compare () member function (which itself is defined in terms of Traits::compare()): Two views are equal if both the size of lhs and rhs are equal and each character in lhs has an equivalent character in rhs at the same position. The ordering comparisons are done lexicographically - the comparison is performed by a function equivalent to ...

std::basic_string_view<CharT,Traits>::operator [] - cppreference.com

en.cppreference.com/cpp/string/basic_string_view/operator_at
Returns a const reference to the character at specified location pos.

std::basic_string_view<CharT,Traits>:: - cppreference.com

en.cppreference.com/cpp/string/basic_string_view/operator=
#include <iostream> #include <string_view> int main() { std::string_view v = "Hello, world"; v = v.substr(7); std::cout << v << '\n'; }

std::basic_string<CharT,Traits,Allocator>::operator basic_string_view ...

en.cppreference.com/cpp/string/basic_string/operator_basic_string_view
Parameters (none) Return value A string view representing the entire contents of the string. Notes It is the programmer's responsibility to ensure that the resulting string view does not outlive the string.

std::basic_string_view<CharT,Traits>:: operator=

en.cppreference.com/w/cpp/string/basic_string_view/operator=.html
< cpp ‎ | string ‎ | basic string view C++ (C++20) (C++20) (C++11) (C++20) (C++17) (C++11) (C++26) [edit] Strings library Classes basic_string basic_string_view ...

std::basic_string_view<CharT,Traits>:: operator [] - Reference

en.cppreference.com/w/cpp/string/basic_string_view/operator_at
Notes Unlike std::basic_string::operator [], std::basic_string_view::operator[](size()) does not return a reference to CharT().

std::basic_string_view<CharT,Traits>:: - cppreference.com

en.cppreference.com/cpp/string/basic_string_view/basic_string_view
1) Default constructor. Constructs an empty std::basic_string_view. After construction, data () is equal to nullptr, and size () is equal to 0.

std::basic_string_view<CharT,Traits>:: basic_string_view

www.en.cppreference.com/w/cpp/string/basic_string_view/basic_string_view.html
4) Constructs a view of the null-terminated character string pointed to by s, not including the terminating null character. The length of the view is determined as if by Traits::length(s).

std::basic_string - cppreference.com

en.cppreference.com/cpp/string/basic_string
References, pointers, and iterators referring to the elements of a basic_string may be invalidated by any standard library function taking a reference to non-const basic_string as an argument, such as std::getline, std::swap, or operator>>, and by calling non-const member functions, except operator [], at, data, front, back, begin, rbegin, end ...
Feedback