Function

EDataServerutil_strdup_strip

since: 3.6

Declaration [src]

gchar*
e_util_strdup_strip (
  const gchar* string
)

Description [src]

Duplicates string and strips off any leading or trailing whitespace. The resulting string is returned unless it is empty or NULL, in which case the function returns NULL.

Free the returned string with g_free().

Available since: 3.6

Parameters

string

Type: const gchar*

A string value, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: gchar*

A newly-allocated, stripped copy of string, or NULL.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.