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

 

insertstring

#include "sflstr.h"
char *
insertstring (
    char *strbuf,
    char *chrstoins,
    int pos)

Synopsis

Inserts a string into another string. Returns a pointer to head of the buffer. Submitted by Scott Beasley jscottb@infoave.com

Source Code - (sflstr.c)

{
   ASSERT (strbuf);
   ASSERT (chrstoins);

   memmove (((strbuf + pos) + strlen (chrstoins)),
            (strbuf + pos), (strlen ((strbuf + pos)) + 1));
   memcpy ((strbuf + pos), chrstoins, strlen (chrstoins));

   return strbuf;
}

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