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

 

getequval

#include "sflstr.h"
char *
getequval (
    char *strline,
    char *strretstr)

Synopsis

get the everything on a line past a '='.

Examples

       char strtest[] = { "progpath=c:\sfl");
       char strret[256];
       getequval (strtest, strret);

    This would return: "c:\sfl".  Returns a pointer to head of the
    return buffer.  Submitted by Scott Beasley <jscottb@infoave.com>

Source Code - (sflstr.c)

{
   char *stroffset;

   ASSERT (strline);
   ASSERT (strretstr);

   stroffset = strstr (strline, "=");

   if (stroffset)
       ltrim ((stroffset + 1));
   else
       return (char *)NULL;

   return strcpy (strretstr,
                  (stroffset && *(stroffset + 1))? (stroffset + 1): "");
}

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