Creates and writes a string attribute.

Procedure:

H5LT_SET_ATTRIBUTE_STRING(loc_id, obj_name, attr_name, attr_data)

Signature:

<pre><code class="language-c">herr_t H5LTset_attribute_string( hid_t loc_id, const char *obj_name, const char *attr_name, const char *attr_data )</code></pre>

<pre><code class="language-fortran">subroutine h5ltset_attribute_string_f(loc_id, dset_name, attr_name, &
                                      buf, errcode )
  implicit none
  integer(HID_T), intent(IN) :: loc_id           ! file or group identifier 
  character(LEN=*), intent(IN) :: dset_name      ! name of the dataset 
  character(LEN=*), intent(IN) :: attr_name      ! name of the attribute
  integer :: errcode                             ! error code
  character(LEN=*), intent(IN) :: buf            ! data buffer
end subroutine h5ltset_attribute_string_f</code></pre>

Parameters:
hid_t loc_idIN: Identifier of the object (dataset or group) to create the attribute within.
const char *obj_nameIN: The name of the object to attach the attribute.
const char *attr_nameIN: The attribute name.
const char * attr_data

IN: Buffer with data to be written to the attribute.

Description:

H5LTattach_attribute creates and writes a string attribute named attr_name and attaches it to the object specified by the name obj_name. If the attribute already exists, it is overwritten.

Returns:

Returns a non-negative value if successful; otherwise returns a negative value.

Example:

Coming Soon!