|
| iMatix home page | << | < | > | >> |
SFLVersion 2.11 |
#include "sflstr.h"
char *
eatchar (
char **strBuff,
char cChar)
Trims white spaces and eats just past occurrence of cChar. If contents of cChar is not found then only white spaces are trimmed.
char strBuff[] = { "('test', 5)" };
eatchar (&strBuff, '(');
On return here strBuff would be: "'test', 5)".
Returns a pointer to head of the input buffer.
Submitted by Scott Beasley <jscottb@infoave.com>
{
ASSERT (strBuff);
ltrim (*strBuff);
if (**strBuff && **strBuff == cChar)
deletechar (*strBuff, 0);
return *strBuff;
}
| | << | < | > | >> |
|