27 Strings library [strings]

27.3 String view classes [string.view]

27.3.3 Class template basic_string_view [string.view.template]

27.3.3.6 Element access [string.view.access]

constexpr const_reference operator[](size_type pos) const;
Throws: Nothing.
constexpr const_reference at(size_type pos) const;
Throws: out_of_range if pos >= size().
constexpr const_reference front() const;
Throws: Nothing.
constexpr const_reference back() const;
Throws: Nothing.
constexpr const charT* data() const noexcept;
[Note 2: 
Unlike basic_string​::​data() and string-literals, data() can return a pointer to a buffer that is not null-terminated.
Therefore it is typically a mistake to pass data() to a function that takes just a const charT* and expects a null-terminated string.
— end note]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant