Method

VteRegexsubstitute

Declaration [src]

char*
vte_regex_substitute (
  VteRegex* regex,
  const char* subject,
  const char* replacement,
  guint32 flags,
  GError** error
)

Description [src]

See man:pcre2api(3) and man:pcre2_substitute(3) for more information.

Available since:0.56

Parameters

subject const char*
 

The subject string.

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

The replacement string.

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

PCRE2 match flags.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: char*
 

The substituted string, or NULL if an error occurred.

 The caller of the method takes ownership of the data, and is responsible for freeing it.
 The value is a NUL terminated UTF-8 string.