Next: str_tokqcnt, Previous: str_tokq, Up: Strings
restore string passed to str_tokq
#include <suplib/str.h>char *str_tokq_restore( char *ptr, char dchar );
char *ptr
- state information returned by
str_tokq
char dchar
- state information returned by
str_tokq
str_tokq
changes the scanned string as it processes it. If
the restore
flag passed to str_tokq
is set then the
string will be restored if the str_tokq
is called to
completion. However, sometimes it's necessary to interrupt the
parsing, and repeatedly calling the str_tokq
to restore the
string is ridiculous.
This function restores the string.
It returns a pointer to the next character that str_tokq
would have returned, except in the case where the end of string was
reached, in which case it will return a pointer to the end of
string character. This allows one to pass the pointer to another
independent invocation of str_tokq
, if,
for example, continued parsing is to be done in another context.
Diab Jerius