Module string

Source

Structs§

TCString
***** TCString *****
TCStringList
***** TCStringList *****

Enums§

RustString

Functions§

tc_string_borrow
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.
tc_string_clone
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.
tc_string_clone_with_len
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.
tc_string_content
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.
tc_string_content_with_len
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.
tc_string_free
Free a TCString. The given string must not be NULL. The string must not be used after this function returns, and must not be freed more than once.
tc_string_list_free
Free a TCStringList instance. The instance, and all TCStringList it contains, must not be used after this call.