summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/sqlite3_str_appendf.3
blob: 09021482a408222bffd5e12f1acac8a168f00388 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.Dd January 24, 2024
.Dt SQLITE3_STR_APPENDF 3
.Os
.Sh NAME
.Nm sqlite3_str_appendf ,
.Nm sqlite3_str_vappendf ,
.Nm sqlite3_str_append ,
.Nm sqlite3_str_appendall ,
.Nm sqlite3_str_appendchar ,
.Nm sqlite3_str_reset
.Nd add content to a dynamic string
.Sh SYNOPSIS
.In sqlite3.h
.Ft void
.Fo sqlite3_str_appendf
.Fa "sqlite3_str*"
.Fa "const char *zFormat"
.Fa "..."
.Fc
.Ft void
.Fo sqlite3_str_vappendf
.Fa "sqlite3_str*"
.Fa "const char *zFormat"
.Fa "va_list"
.Fc
.Ft void
.Fo sqlite3_str_append
.Fa "sqlite3_str*"
.Fa "const char *zIn"
.Fa "int N"
.Fc
.Ft void
.Fo sqlite3_str_appendall
.Fa "sqlite3_str*"
.Fa "const char *zIn"
.Fc
.Ft void
.Fo sqlite3_str_appendchar
.Fa "sqlite3_str*"
.Fa "int N"
.Fa "char C"
.Fc
.Ft void
.Fo sqlite3_str_reset
.Fa "sqlite3_str*"
.Fc
.Sh DESCRIPTION
These interfaces add content to an sqlite3_str object previously obtained
from
.Fn sqlite3_str_new .
The sqlite3_str_appendf(X,F,...) and sqlite3_str_vappendf(X,F,V)
interfaces uses the built-in printf functionality of
SQLite to append formatted text onto the end of sqlite3_str
object X.
.Pp
The sqlite3_str_append(X,S,N) method appends
exactly N bytes from string S onto the end of the sqlite3_str
object X.
N must be non-negative.
S must contain at least N non-zero bytes of content.
To append a zero-terminated string in its entirety, use the
.Fn sqlite3_str_appendall
method instead.
.Pp
The sqlite3_str_appendall(X,S) method appends
the complete content of zero-terminated string S onto the end of sqlite3_str
object X.
.Pp
The sqlite3_str_appendchar(X,N,C) method
appends N copies of the single-byte character C onto the end of sqlite3_str
object X.
This method can be used, for example, to add whitespace indentation.
.Pp
The sqlite3_str_reset(X) method resets the string
under construction inside sqlite3_str object X back to zero
bytes in length.
.Pp
These methods do not return a result code.
If an error occurs, that fact is recorded in the sqlite3_str
object and can be recovered by a subsequent call to sqlite3_str_errcode(X).
.Sh IMPLEMENTATION NOTES
These declarations were extracted from the
interface documentation at line 8442.
.Bd -literal
SQLITE_API void sqlite3_str_appendf(sqlite3_str*, const char *zFormat, ...);
SQLITE_API void sqlite3_str_vappendf(sqlite3_str*, const char *zFormat, va_list);
SQLITE_API void sqlite3_str_append(sqlite3_str*, const char *zIn, int N);
SQLITE_API void sqlite3_str_appendall(sqlite3_str*, const char *zIn);
SQLITE_API void sqlite3_str_appendchar(sqlite3_str*, int N, char C);
SQLITE_API void sqlite3_str_reset(sqlite3_str*);
.Ed
.Sh SEE ALSO
.Xr sqlite3_str 3 ,
.Xr sqlite3_str_new 3