dstr_get_data

3

dstr_get_data

dstr_get_data_length

dstr_get_data_str

exporting data from dstring_t structure

    #include <cds/dstring.h>

      int dstr_get_data_length
      dstring_t *dstr

      int dstr_get_data
      dstring_t *dstr
      char *dst

      int dstr_get_data_str
      dstring_t *dstr
      str_t *dst

## Description

`dstr_get_data_length` function is used to determine the size of data present in dynamic string. It returns negative value on error.

`dstr_get_data` copies data from internal buffers into given character array allocated by caller. The data size can be determined by `dstr_get_data_length` call.

`dstr_get_data_str` copies data from internal buffers into internally allocated string. This string is returned in the `dst` parameter.

## Return value

Functions `dstr_get_data` and `dstr_get_data_str` return 0 if successful, nonzero otherwise.

Function `dstr_get_data_length` returns negative value on error, zero if there is no data in dynamic string and positive if there was no error and data present.

## See Also

dstring_t