2001-02-02 17:54:47 +00:00
|
|
|
.TH stralloc_copy 3
|
|
|
|
.SH NAME
|
|
|
|
stralloc_copy \- copy data into a stralloc
|
|
|
|
.SH SYNTAX
|
2017-05-13 22:51:26 +00:00
|
|
|
.B #include <libowfat/stralloc.h>
|
2001-02-02 17:54:47 +00:00
|
|
|
|
2002-10-21 14:59:02 +00:00
|
|
|
int \fBstralloc_copy\fP(stralloc* \fIsato\fR,stralloc* \fIsafrom\fR);
|
2001-02-02 17:54:47 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
stralloc_copy copies the string stored in \fIsafrom\fR into \fIsa\fR. It
|
|
|
|
is the same as
|
|
|
|
\fBstralloc_copyb\fR(&\fIsato\fR, \fIsafrom\fR.s, \fIsafrom\fR.len).
|
|
|
|
\fIsafrom\fR must already be allocated.
|
|
|
|
|
|
|
|
The data that \fIsa\fR previously contained is overwritten and truncated.
|
2002-10-17 20:32:03 +00:00
|
|
|
|
|
|
|
If stralloc_copy has trouble allocating memory, it returns 0. Otherwise
|
|
|
|
it returns 1.
|
2004-11-25 21:29:35 +00:00
|
|
|
.SH "RETURN VALUE"
|
|
|
|
1 for success, 0 on memory allocation failure.
|
2001-02-02 17:54:47 +00:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
stralloc_copyb(3)
|