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

 

replacechrswith

#include "sflstr.h"
char *
replacechrswith (
    char *strbuf,
    char *chrstorm,
    char chartorlcwith)

Synopsis

Subsitutes known char(s)in a string with another. Returns pointer to head of the buffer. Submitted by Scott Beasley jscottb@infoave.com

Source Code - (sflstr.c)

{
   char *offset;

   ASSERT (strbuf);
   ASSERT (chrstorm);

   offset = (char *)NULL;

   while (*strbuf)
      {
         offset = strpbrk (strbuf, chrstorm);
         if (offset)
           {
             *(offset)= chartorlcwith;
           }

         else
             break;
      }

   return strbuf;
}

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