Small. Fast. Reliable.
Choose any three.
void sqlite3_str_appendf(sqlite3_str*, const char *zFormat, ...); void sqlite3_str_vappendf(sqlite3_str*, const char *zFormat, va_list); void sqlite3_str_append(sqlite3_str*, const char *zIn, int N); void sqlite3_str_appendall(sqlite3_str*, const char *zIn); void sqlite3_str_appendchar(sqlite3_str*, int N, char C); void sqlite3_str_reset(sqlite3_str*); void sqlite3_str_truncate(sqlite3_str*,int N);
These interfaces add or remove content to an sqlite3_str object previously obtained from
.
The
and
interfaces uses the
functionality of SQLite to append formatted text onto the end of
object X.
The
method appends exactly N bytes from string S onto the end of the
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
method instead.
The
method appends the complete content of zero-terminated string S onto the end of
object X.
The
method appends N copies of the single-byte character C onto the end of
object X. This method can be used, for example, to add whitespace indentation.
The
method resets the string under construction inside
object X back to zero bytes in length.
The
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.
These methods do not return a result code. If an error occurs, that fact is recorded in the
object and can be recovered by a subsequent call to
.
See also lists of
,
, and
.