pub fn replace<'a, P: Pattern<'a>>(&'a self, from: P, to: &str) -> String {
        let mut result = String::new();
        let mut last_end = 0;
        for (start, part) in self.match_indices(from) {
            result.push_str(unsafe { self.get_unchecked(last_end..start) });
            result.push_str(to);
            last_end = start + part.len();
        }
        result.push_str(unsafe { self.get_unchecked(last_end..self.len()) });
        result
    }
Returns the lowercase equivalent of this string slice, as a new [`String`].

'Lowercase' is defined according to the terms of the Unicode Derived Core Property
`Lowercase`.

Since some characters can expand into multiple characters when changing
the case, this function returns a [`String`] instead of modifying the
parameter in-place.

# Examples

Basic usage:

```
let s = "HELLO";

assert_eq!("hello", s.to_lowercase());
```

A tricky
benchmarks/haystacks/code/rust-library.rs