Next: , Previous: str_tokbq_free, Up: Strings


4.16 str_tokbq_restore

restore string passed to str_tokbq

Synopsis

     #include <suplib/str.h>
     
     
     
char *str_tokbq_restore(struct str_tokbqdata *tqbd);

Parameters

struct str_tokbqdata *tqbd
Not Documented.

Description

str_tokbq changes the scanned string as it processes it. If the restore flag passed to str_tokbq is set then the string will be restored if the str_tokbq is called to completion. However, sometimes it's necessary to interrupt the parsing, and repeatedly calling the str_tokbq to restore the string is ridiculous.

This function restores the string.

Returns

It returns a pointer to the next character that str_tokbq 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_tokbq, if, for example, continued parsing is to be done in another context.

Author

Diab Jerius