| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

eatchar

#include "sflstr.h"
char *
eatchar (
    char **strBuff,
    char cChar)

Synopsis

Trims white spaces and eats just past occurrence of cChar. If contents of cChar is not found then only white spaces are trimmed.

Examples

       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>

Source Code - (sflstr.c)

{
   ASSERT (strBuff);

   ltrim (*strBuff);
   if (**strBuff && **strBuff == cChar)
       deletechar (*strBuff, 0);

   return *strBuff;
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation