libowfat/stralloc/stralloc_copys.3

19 lines
610 B
Groff
Raw Normal View History

2001-02-02 17:54:47 +00:00
.TH stralloc_copys 3
.SH NAME
stralloc_copys \- copy data into a stralloc
.SH SYNTAX
.B #include <stralloc.h>
2002-10-21 14:59:02 +00:00
int \fBstralloc_copys\fP(stralloc* \fIsa\fR,const char* \fIbuf\fR);
2001-02-02 17:54:47 +00:00
.SH DESCRIPTION
stralloc_copys copies a \\0-terminated string from \fIbuf\fR into
\fIsa\fR, without the \\0. It is the same as
\fBstralloc_copyb\fR(&\fIsa\fR, \fIbuf\fR, str_len(\fIbuf\fR)).
The data that \fIsa\fR previously contained is overwritten and truncated.
2002-10-17 18:43:19 +00:00
.SH "RETURN VALUE"
If stralloc_copys runs out of memory, stralloc_copys leaves \fIsa\fR
alone and return 0, otherwise it returns 1.
2001-02-02 17:54:47 +00:00
.SH "SEE ALSO"
stralloc_copyb(3)