long InsertStr(char *string,*searchstrings,*replacestring);

long InsertStr(char *s,*ss,*rs) {
  long el=0,l=strlen(s); char *c1p=s,*c2p=fs,c; c1p+=l;
  if(al>l) {
   al-=l; while(al) { if(!*c2p) c2p=fs; else { *c1p++=*c2p++; al--; } };
   *c1p=0;
  }
  return el;
 }                                               /* FillString $V:0.1 */

int main(int argc,char *argv[]) {                             /* main */
  long el=0,l; char *s[1024],*fs[1024];
  if(argc==1)                                                          {
   strcpy(s,"this string is 55 chars long "); strcpy(fs,"-");
   l=FillString(s,fs,55); printf(" s = %s  l = %ld\n",s,strlen(s));
  } else                                                               {
   strcpy(s,argv[1]);
   l=FillString(s,argv[2],atol(argv[3])); printf("%s\n",s);
  }
  return el;
 }                                                             /* END */

