Pre-RFC: Pattern API v3.0


Sales pitch:

  • Support pattern API for &str, &mut str, &[T], &mut [T] and &OsStr, optionally Vec<T> and DoublyLinkedList<T>.

  • The new API allows trim_start(&str)'s speed to be improved up to 35×.






Thanks for the pointer. You mean we could fallback to galil-seiferas instead of naive search when T: PartialEq + !Ord?


Yeah, something like that might be a good idea.

(tho as always, constant factors may be more important for smaller inputs)


Pushed as RFC 2500.