CBuild wiki
Dynamic string - string builder. Specialization of DynArray.h for
char
datatype.
License: GPL-3.0-or-later.
String builder string builder.
char*
data Pointer to data. This pointer
“owns” the data.size_t size Length of string builder. Data in
range from data to data+size is
guaranteed to be valid.size_t capacity Length of allocated data. Data is
guaranteed to be allocated (but may be not initialized) from data to data+size.Format description for string view for printf-style formatters.
Format argument for string view for printf-style formatters.
Append c-string to string builder.
cbuild_sb_t*
sb String builder object.char*
cstr C-string (NULL-terminated).Append NULL-terminator to string builder.
cbuild_sb_t*
sb String builder object.strcmp for string builder. Fully compatible but extends
API.
-2 If size of first
string builder is smaller.-1 If first different
character in first string builder is smaller.0 If two string
builders are equal.1 If first different
character in first string builder is larger.2 If size of first
string builder is larger.Append utf8 character to a string builder.
cbuild_sb_t*
sb String builder object.uint32_t
cp UTF8 codepoint.Get length of a string builder in utf8 codepoints.
Invalid codepoints assumed to have length of 1
Convert string builder to a string view.
Convert string view to a string builder (allocated new data).
Apppend string view to a string builder
cbuild_sb_t*
sb String builder object.cbuild_sv_t cstr String view.Append data to a string builder using printf-style format string.
Append data to a string builder using printf-style format string.