Trait sourceview4::prelude::SearchContextExtManual
source · pub trait SearchContextExtManual: 'static {
// Required method
fn replace_all(&self, replace: &str) -> Result<(), Error>;
}
Required Methods§
sourcefn replace_all(&self, replace: &str) -> Result<(), Error>
fn replace_all(&self, replace: &str) -> Result<(), Error>
Replaces all search matches by another text. It is a synchronous function, so it can block the user interface.
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.
replace
the replacement text.
replace_length
the length of replace
in bytes, or -1.
Returns
the number of replaced matches.