Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Related Pages

striter: Iterator over substrings of a str.


Data Structures

struct  striter
 The basic striter data type. More...


Defines

#define str_copyiter(STR, ITER)   str_copyb(STR,(ITER)->startptr,(ITER)->len)
 Assign the current striter substring to a str.

#define str_catiter(STR, ITER)   str_catb(STR,(ITER)->startptr,(ITER)->len)
 Append the current striter substring to a str.

#define obuf_putiter(OBUF, ITER)   obuf_write(OBUF,(ITER)->startptr,(ITER)->len)
 Output the current striter substring to an obuf.

#define striter_loop(ITER, STR, SEP)   for(striter_start(ITER,STR,SEP);striter_valid(ITER);striter_advance(ITER))
 Loop macro; use in place of for(...).


Functions

void striter_start (striter *iter, const str *s, char sep)
 Start (initialize) a striter.

int striter_valid (striter *)
 Determine if a striter is valid (after initialization or advancing).

int striter_advance (striter *)
 Advance a striter to the next substring.


Detailed Description

Calling Convention
All non-void functions return 0 (false) if the function failed or the iterator is no longer valid, and non-zero (true) otherwise.

Generated on Mon Dec 1 13:28:06 2003 for bglibs by doxygen 1.3.3