#[no_mangle]
pub unsafe extern "C" fn tc_string_content(
tcstring: *const TCString,
) -> *const c_char
Expand description
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.
In general, prefer tc_string_content_with_len
except when it’s certain that the string is
valid and NUL-free.
This function takes the TCString by pointer because it may be modified in-place to add a NUL terminator. The pointer must not be NULL.
This function does not take ownership of the TCString.
EXTERN_C const char *tc_string_content(const struct TCString *tcstring);