-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstring_initfromstringz.3
More file actions
25 lines (25 loc) · 932 Bytes
/
string_initfromstringz.3
File metadata and controls
25 lines (25 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
.TH STRING_INITFROMSTRINGZ 3 2010-01-29 "http://github.com/hce/bstring" "bstring user's manual"
.SH NAME
string_initfromstringz - initialize a bstring from a zero-terminated string
.SH SYNOPSIS
.nf
.B #include <bstring.h>
.sp
.BI "int string_initfromstringz(struct string* " string ", const char const* " sz ")
.sp
.SH DESCRIPTION
The
.BR string_initfromstringz()
function initializes a bstring and copies the contents of \fBsz\fP
into it, till the terminating zero is found. Unlike the other
initialization functions, this function can fail.
.SH NOTES
The bstring initialized by
.BR string_initfromstringz()
should be used readonly, because the \fBgrowby\fP value will be set to
an inefficient value. The reason this function exists is mainly to
provide a wrapper for functions requiring a bstring as parameter when
you only got a stringz.
.SH RETURN VALUE
.BR string_initfromstringz()
returns zero on success, otherwise nonzero.