Create a new TCString referencing the given C string. The C string must remain valid and
unchanged until after the TCString is freed. It’s typically easiest to ensure this by using a
static string.
Create a new TCString by cloning the content of the given C string. The resulting TCString
is independent of the given string, which can be freed or overwritten immediately.
Create a new TCString containing the given string with the given length. This allows creation
of strings containing embedded NUL characters. As with tc_string_clone, the resulting
TCString is independent of the passed buffer, which may be reused or freed immediately.
Get the content of the string as a regular C string. The given string must be valid. The
returned value is NULL if the string contains NUL bytes or (in some cases) invalid UTF-8. The
returned C string is valid until the TCString is freed or passed to another TC API function.
Get the content of the string as a pointer and length. The given string must not be NULL.
This function can return any string, even one including NUL bytes or invalid UTF-8. The
returned buffer is valid until the TCString is freed or passed to another TaskChampio
function.