Function

FwupdPluginstring_replace

Declaration [src]

guint
fu_string_replace (
  GString* string,
  const gchar* search,
  const gchar* replace
)

Description [src]

Performs multiple search and replace operations on the given string.

Available since:1.8.2

Parameters

string GString
 

The GString to operate on.

 The data is owned by the caller of the function.
search const gchar*
 

The text to search for.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
replace const gchar*
 

The text to use for substitutions.

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

Return value

Returns: guint
 

The number of replacements done, or 0 if search is not found.