21 Strings library [strings]

21.4 String view classes [string.view]

21.4.2 Class template basic_Β­string_Β­view [string.view.template]

21.4.2.3 Capacity [string.view.capacity]

constexpr size_type size() const noexcept; constexpr size_type length() const noexcept;
Returns: size_Β­.
constexpr size_type max_size() const noexcept;
Returns: The largest possible number of char-like objects that can be referred to by a basic_Β­string_Β­view.
[[nodiscard]] constexpr bool empty() const noexcept;
Returns: size_Β­ == 0.