skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

stralloc_catb.c (243B)


      1 /* ISC license. */
      2 
      3 #include <string.h>
      4 #include <skalibs/stralloc.h>
      5 
      6 int stralloc_catb (stralloc *sa, char const *s, size_t n)
      7 {
      8   if (!stralloc_readyplus(sa, n)) return 0 ;
      9   memmove(sa->s + sa->len, s, n) ;
     10   sa->len += n ;
     11   return 1 ;
     12 }