1stralloc_copyb(3) Library Functions Manual stralloc_copyb(3)
2
3
4
6 stralloc_copyb - copy data into a stralloc
7
9 #include <stralloc.h>
10
11 int stralloc_copyb(stralloc* sa,const char* buf,size_t len);
12
14 stralloc_copyb makes sure that sa has enough space allocated to hold
15 len bytes. Then it copies the first len bytes from buf into the stralā
16 loc.
17
18 The data that sa previously contained is overwritten and truncated.
19
20 If stralloc_copys runs out of memory, stralloc_copys leaves sa alone
21 and return 0, otherwise it returns 1.
22
24 1 for success, 0 on memory allocation failure.
25
26
27
28 stralloc_copyb(3)