SourceSearchContext.replace

Replaces a search match by another text. If match_start and match_end doesn't correspond to a search match, FALSE is returned. For a regular expression replacement, you can check if replace is valid by calling g_regex_check_replacement(). The replace text can contain backreferences; read the g_regex_replace() documentation for more details.

class SourceSearchContext
int
replace

Parameters

matchStart TextIter

the start of the match to replace.

matchEnd TextIter

the end of the match to replace.

replace string

the replacement text.

Return Value

Type: int

whether the match has been replaced. Since 3.10

Throws

GException on failure.

Meta