[][src]Function rust_tokenizers::preprocessing::tokenizer::tokenization_utils::replace_string

pub fn replace_string(
    token: &mut Token,
    pattern: &str,
    replacement_string: &str
)

Replaces a pattern &str by a replacement &str keeping track of the offsets (all new characters in replacement have the same reference offset as the first pattern character as these may have a different size)