2001-02-02 17:54:47 +00:00
|
|
|
.TH stralloc_copyb 3
|
|
|
|
.SH NAME
|
|
|
|
stralloc_copyb \- copy data into a stralloc
|
|
|
|
.SH SYNTAX
|
|
|
|
.B #include <stralloc.h>
|
|
|
|
|
2006-11-07 17:56:05 +00:00
|
|
|
int \fBstralloc_copyb\fP(stralloc* \fIsa\fR,const char* \fIbuf\fR,size_t \fIlen\fR);
|
2001-02-02 17:54:47 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
stralloc_copyb makes sure that \fIsa\fR has enough space allocated to hold
|
|
|
|
\fIlen\fR bytes. Then it copies the first \fIlen\fR bytes from
|
|
|
|
\fIbuf\fR into the stralloc.
|
|
|
|
|
|
|
|
The data that \fIsa\fR previously contained is overwritten and truncated.
|
2004-11-25 21:29:35 +00:00
|
|
|
|
2002-10-17 18:43:19 +00:00
|
|
|
If stralloc_copys runs out of memory, stralloc_copys leaves \fIsa\fR
|
|
|
|
alone and return 0, otherwise it returns 1.
|
2004-11-25 21:29:35 +00:00
|
|
|
.SH "RETURN VALUE"
|
|
|
|
1 for success, 0 on memory allocation failure.
|