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