Function ntcore_sys::NT_GetValueString [] [src]

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

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.

@param value NT_Value struct to get the string from @param last_change returns time in ms since the last change in the value @param str_len returns the length of the string @return pointer to the string (UTF-8), or null if error

It is the caller's responsibility to free the string once its 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.