Function rosidl_runtime_c__U16String__Sequence__init

Function Documentation

bool rosidl_runtime_c__U16String__Sequence__init(rosidl_runtime_c__U16String__Sequence *sequence, size_t size)

Initialize a U16 string sequence structure.

The rosidl_runtime_c__U16String__Sequence is initialized to the size passed to the function. The U16 string sequence structure should be deallocated using the given function rosidl_runtime_c__U16String__Sequence__fini() when it is no longer needed. Calling this function with an already initialized U16 string sequence structure will leak memory.

Parameters:
  • sequence[inout] a pointer to a U16 string sequence structure

  • size[in] represents the size of the U16 string sequence

Returns:

true if successful, false if the passed string pointer is null or the memory allocation failed