Function

FwupdPluginstring_replace

since: 1.8.2

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

Type: GString

The GString to operate on.

The data is owned by the caller of the function.
search

Type: 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

Type: 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

Type: guint

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