std::sub_match::length(3)

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

πŸ’… std::sub_match::length(3) β€” C++ Standard Libary manual realness ✨

okay so bestie, welcome to the std::sub_match::length page from the C++ Standard Libary manual πŸ¦‹ this one is short, sweet, and lowkey iconic β€” no cap.


✨ NAME ✨

std::sub_match::length β€” and yes, the description is literally also std::sub_match::length πŸ’… it’s giving β€œthe name is the name, periodt.”


πŸŽ€ Synopsis πŸŽ€

difference_type length() const;

that’s the whole signature, bestie β€” clean, const, and ready to slay πŸ”₯


🌸 Parameters 🌸

  • (none) β€” literally no parameters, not a single one, we love a no-argument moment 🫢

πŸ’– Return value πŸ’–

Returns the number of characters in the match, i.e. std::distance(first, second) if the match is valid, 0 otherwise. fr fr, that’s the whole vibe check: valid match gets the character count, invalid match gets 0 πŸ’€


⭐ Complexity ⭐

Constant. yup β€” constant time, no drama, main character energy only πŸ‘‘


mwah πŸ’‹ β€” source/version: http://cppreference.com, dated 2024.06.10, page std::sub_match::length(3). bye bestie, go count those characters πŸ§šπŸ’œ

πŸ“¦ where this page comes from