#include <fsStrUt.h>
Collaboration diagram for fs::ut::str::Toknzr_t:

Toknzr_t parses the input text sequentially and provides individual tokens according to the given criteria (quoted tokens are also supported). Note that Toknzr_t doesn't copy the input text, so there is no memory overhead. The example of the usage see below.
fs::ut::str::Toknzr_t Toknzr("one, two, \"t h r e e\"", " ,", '\"'); for(const char *pszTok = Toknzr.Next(); pszTok; pszTok = Toknzr.Next()) { ::printf("token: %s\n", pszTok); }
Definition at line 106 of file fsStrUt.h.
Public Member Functions | |
| Toknzr_t (const char *pszText, const char *pszSprs=" \t", char chQuote= '\"') | |
| Receives the input text and parsing criteria. | |
| ~Toknzr_t () | |
| const char * | Next () |
| Returns the next token (0 - no more tokens or error). | |
Private Member Functions | |
| Toknzr_t () | |
| No def ctor. | |
| Toknzr_t (const Toknzr_t &) | |
| No copy. | |
| Toknzr_t & | operator= (const Toknzr_t &) |
| No assignment. | |
Private Attributes | |
| void * | m_pImpl |
| The PIPML idiom is used. | |
| Toknzr_t::Toknzr_t | ( | const char * | pszText, | |
| const char * | pszSprs = " \t", |
|||
| char | chQuote = '\"' | |||
| ) | [explicit] |
Receives the input text and parsing criteria.
Definition at line 254 of file fsStrUt.cpp.
References FS_ASSERT_MSG, and m_pImpl.
| Toknzr_t::~Toknzr_t | ( | ) |
| fs::ut::str::Toknzr_t::Toknzr_t | ( | ) | [private] |
No def ctor.
| fs::ut::str::Toknzr_t::Toknzr_t | ( | const Toknzr_t & | ) | [private] |
No copy.
| const char * Toknzr_t::Next | ( | ) |
Returns the next token (0 - no more tokens or error).
Definition at line 266 of file fsStrUt.cpp.
References FS_ASSERT_MSG, and m_pImpl.
void* fs::ut::str::Toknzr_t::m_pImpl [private] |