Data Structures | |
struct | striter |
Defines | |
#define | str_copyiter(STR, ITER) str_copyb(STR,(ITER)->startptr,(ITER)->len) |
#define | str_catiter(STR, ITER) str_catb(STR,(ITER)->startptr,(ITER)->len) |
#define | obuf_putiter(OBUF, ITER) obuf_write(OBUF,(ITER)->startptr,(ITER)->len) |
#define | striter_loop(ITER, STR, SEP) for(striter_start(ITER,STR,SEP);striter_valid(ITER);striter_advance(ITER)) |
Functions | |
void | striter_start (striter *iter, const struct str *s, char sep) |
int | striter_valid (striter *) |
int | striter_advance (striter *) |
0
(false) if the function failed or the iterator is no longer valid, and non-zero (true) otherwise. #define obuf_putiter | ( | OBUF, | |||
ITER | ) | obuf_write(OBUF,(ITER)->startptr,(ITER)->len) |
#define str_catiter | ( | STR, | |||
ITER | ) | str_catb(STR,(ITER)->startptr,(ITER)->len) |
#define str_copyiter | ( | STR, | |||
ITER | ) | str_copyb(STR,(ITER)->startptr,(ITER)->len) |
#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
(...)
int striter_valid | ( | striter * | iter | ) |
Determine if a striter is valid (after initialization or advancing).