stable_string_patterns_method 0.0.1

Stable polyfill to be able to depends on a trait that mimics `str::pattern::Pattern` on stable Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
Stable polyfill to be able to depends on a trait that mimics `str::pattern::Pattern` on stable Rust.

```rust
fn starts_and_ends_with(haystack: &str, p: impl IntoSearchable + Clone) -> bool {
    haystack.starts_with_(p.clone()) && haystack.ends_with_(p)
}

assert!(starts_and_ends_with("aa bb aa", "aa"));
assert!(starts_and_ends_with("aa bb aa", 'a'));
assert!(starts_and_ends_with("aa bb cc", ['a','c']));
assert!(starts_and_ends_with("\t bb  \n", WhiteSpace));
```