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

 

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. 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)

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

   return *strBuff;
}

| << | < | > | >> iMatix Copyright © 1996-98 iMatix