NT_GetValueString

Function NT_GetValueString 

Source
pub unsafe extern "C" fn NT_GetValueString(
    value: *const NT_Value,
    last_change: *mut u64,
    str_len: *mut usize,
) -> *mut c_char
Expand description

Returns a copy of the string from the NT_Value. If the NT_Value is null, or is assigned to a different type, returns 0.

§Parameters

  • value: NT_Value struct to get the string from.
  • last_change: Returns time in ms since the last change in the value.
  • str_len: Returns the length of the string.

§Returns

Pointer to the string (UTF-8), or null if error.

It is the caller’s responsibility to free the string once it’s no longer needed. The NT_FreeCharArray() function is useful for this purpose. The returned string is a copy of the string in the value, and must be freed separately.