ost::Strin...::iterator(3)
π ost::Strin...::iterator(3) β Library Functions Manual π
okay bestie, buckle up, we're reading the ost::StringTokenizer::iterator manpage from the Library Functions Manual and honestly? she's a lil icon. let's get into it β¨
πΈ NAME πΈ
ost::StringTokenizer::iterator β the input forward iterator for tokens. that's her. that's the whole job. π
π¦ SYNOPSIS π¦
#include <tokenizer.h>
β¨ Public Member Functions β¨
iterator ()β the plain default constructor, no drama πvirtual ~iterator ()β the destructor, virtual as always, doing her lil cleanup πiterator (const iterator &i)β copy constructor. yes queen, duplicate thyself πiterator & operator= (const iterator &i)β assignment operator. one iterator becomes another's whole personality π«Άiterator & operator++ () THROWS(NoSuchElementException)β shifts this iterator to the next token in the string. the way she just moves on to the next one πconst char * operator* () THROWS(NoSuchElementException)β returns the immutable string this iterator points to or'0'if no token is available (i.e. β¦) βchar nextDelimiter () constβ returns the next delimiter after the current token or' ', if there are no following delimiters. peeking ahead, nosy but make it useful πbool operator== (const iterator &other) constβ compares to other iterator. are we the same? π―bool operator!= (const iterator &other) constβ compares to other iterator. are we not the same? π
π Friends π
class StringTokenizerβ friendship bracelet acquired π«Ά
π§ Detailed Description π§
The input forward iterator for tokens. that's the vibe. forward-only, token-by-token, no going back bestie, we live in the now β¨
π Author π
- Henner Zeller β thank you for your service, king π
π Constructor & Destructor Documentation π
ost::StringTokenizer::iterator::iterator () [inline]
the default one. no args, no notes, just vibes πΈ
virtual ost::StringTokenizer::iterator::~iterator () [inline], [virtual]
the destructor, and she's virtual, as she should be π
ost::StringTokenizer::iterator::iterator (const iterator & i) [inline]
copy constructor. literally clone her, no cap π
β Member Function Documentation β
char ost::StringTokenizer::iterator::nextDelimiter () const [inline]
returns the next delimiter after the current token or '\0', if there are no following delimiters. It returns the very next delimiter (even if skipAllDelim=true).
heads up bestie, the SYNOPSIS up top says' 'for the no-following-delimiters case and this detailed bit says'\0'β that's just what the page says, both versions, no edits from me, iykyk π keep it in mind fr fr
bool ost::StringTokenizer::iterator::operator!= (const iterator & other) const [inline]
compares to other iterator. Usually used to compare against the end() iterator. the classic "are we done yet" check, main character energy π
const char* ost::StringTokenizer::iterator::operator* ()
returns the immutable string this iterator points to or '0' if no token is available (i.e. i == end()). Do not store pointers to this token, since it is invalidated for each iteration. If you need the token, copy it (e.g. with strdup());
β οΈ for real, do NOT hoard that pointer. she gets invalidated every single iteration. if you want to keep the token, copy it β like with strdup(). storing the raw pointer is giving chaos π
iterator& ost::StringTokenizer::iterator::operator++ ()
shifts this iterator to the next token in the string. moving forward, always forward π¦
iterator& ost::StringTokenizer::iterator::operator= (const iterator & i) [inline]
assignment operator. she is now her. slay π
bool ost::StringTokenizer::iterator::operator== (const iterator & other) const [inline]
compares to other iterator. Usually used to compare against the end() iterator. same energy check β¨
π Friends And Related Function Documentation π
friend class StringTokenizer [friend]
bestie privileges: fully granted. StringTokenizer is in the group chat π«Ά
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code. not a human hand in sight, and yet she ate π₯
and that's the whole page bestie, no cap, every flag and every function accounted for πΈπ β¨
okay so this page comes from GNU CommonC++, dated Sun Dec 27 2020, and it lives at ost::Strin...::iterator(3) in the manual β mwah, go forth and tokenize responsibly πππ
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms