std::experi...iew::rbegin,(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 NAME 🌸

okay so bestie, this page is literally about std::experimental::basic_string_view::rbegin β€” and yeah the name line in the original is a whole mess, it says std::experimental::basic_string_view::rbegin, - and then std::experimental::basic_string_view::rbegin, again, so it's giving "said it twice for emphasis" energy πŸ’… (it's from the C++ Standard Library manual family, if you were wondering where we're at).


✨ Synopsis ✨

here's the whole thing, no notes, exactly as written:

constexpr const_reverse_iterator rbegin() const noexcept;  (library
fundamentals TS)
constexpr const_reverse_iterator crbegin() const           (library
fundamentals TS)
noexcept;

both of these are the library fundamentals TS version, just so we're clear 🫢

so what does it actually do? it returns a reverse iterator pointing at the first character of the reversed view β€” which, yes, is the same thing as the last character of the non-reversed view. the way that works is honestly iconic: you flip the direction, and suddenly "first" means "last." main character energy πŸ”₯

also there's a little diagram on the page, it's called range-rbegin-rend.svg β€” that's the visual, go look at it if you're a visual learner πŸ¦‹


πŸŽ€ Parameters πŸŽ€

  • (none) β€” yeah, nothing. no parameters. she takes nothing. periodt πŸ’€

⭐ Return value ⭐

a const_reverse_iterator to the first character ✨


🌈 Complexity 🌈

Constant. like, constant. it's not doing a loop, bestie, it's just vibing in O(1) πŸ’–


πŸ¦‹ See also πŸ¦‹

  • rend β€” returns a reverse iterator to the end
  • crend β€” (public member function)

πŸ‘‘ Category πŸ‘‘

  • Noindexed pages

ok lowkey quick reminder: this is the TS (std::experimental) version of things, so don't go acting like it's the fully standardized one, iykyk πŸ™ˆ

and that's the page!! fr fr, it's short but she ate. this was the std::experi...iew::rbegin,(3) page off http://cppreference.com, dated 2024.06.10 β€” mwah, go reverse some iterators bestie πŸ§šπŸ’œπŸŒΈ

πŸ“¦ where this page comes from