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