Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
658 B

  1. .TH stralloc_copys 3
  2. .SH NAME
  3. stralloc_copys \- copy data into a stralloc
  4. .SH SYNTAX
  5. .B #include <stralloc.h>
  6. int \fBstralloc_copys\fP(stralloc* \fIsa\fR,const char* \fIbuf\fR);
  7. .SH DESCRIPTION
  8. stralloc_copys copies a \\0-terminated string from \fIbuf\fR into
  9. \fIsa\fR, without the \\0. It is the same as
  10. \fBstralloc_copyb\fR(&\fIsa\fR, \fIbuf\fR, str_len(\fIbuf\fR)).
  11. The data that \fIsa\fR previously contained is overwritten and truncated.
  12. If stralloc_copys runs out of memory, stralloc_copys leaves \fIsa\fR
  13. alone and return 0, otherwise it returns 1.
  14. .SH "RETURN VALUE"
  15. 1 for success, 0 on memory allocation failure.
  16. .SH "SEE ALSO"
  17. stralloc_copyb(3)