sttemp

Simple template manager
git clone git://git.konyahin.xyz/sttemp
Log | Files | Refs | README | LICENSE

strings.c (375B)


      1 /* See LICENSE file for copyright and license details. */
      2 
      3 #include "strings.h"
      4 
      5 char* strconcat(const char* first, const char* second) {
      6     size_t first_len = strlen(first);
      7     size_t second_len = strlen(second);
      8     char *buf = malloc(first_len + second_len + 1);
      9     memcpy(buf, first, first_len);
     10     memcpy(buf + first_len, second, second_len + 1);
     11     return buf;
     12 }
     13