mirror of
https://github.com/samsonjs/lake.git
synced 2026-03-25 08:55:49 +00:00
21 lines
325 B
C
21 lines
325 B
C
/**
|
|
* common.c
|
|
* Lake Scheme
|
|
*
|
|
* Copyright 2011 Sami Samhuri
|
|
* MIT License
|
|
*
|
|
*/
|
|
|
|
#include <stddef.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
char *lake_str_append(char *s1, char *s2)
|
|
{
|
|
size_t n2 = strlen(s2);
|
|
s1 = realloc(s1, strlen(s1) + n2 + 1);
|
|
strncat(s1, s2, n2);
|
|
return s1;
|
|
}
|