.Dd $Mdocdate$
.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 ,
.Nm sqlite3_str_truncate
.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
.Ft void
.Fo sqlite3_str_truncate
.Fa "sqlite3_str*"
.Fa "int N"
.Fc
.Sh DESCRIPTION
These interfaces add or remove 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
The sqlite3_str_truncate(X,N) method changes
the length of the string under construction to be N bytes or less.
This routine is a no-op if N is negative or if the string is already
N bytes or smaller in size.
.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 8842.
.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*);
SQLITE_API void sqlite3_str_truncate(sqlite3_str*,int N);
.Ed
.Sh SEE ALSO
.Xr sqlite3_str 3 ,
.Xr sqlite3_str_new 3
