"Ranges..." => "Needles..." in [starts|ends]With.
To avoid any confusion: The stuff in ranges may or may not actually be ranges. generic "Needles" is what best describes it.
Clean up endsWith unittests
Original author wrote "wrap" because filter is not bidirectional. However, the function filterBidirectional fits the need, so migrating to that.
Bit of unicode unittest in [starts|ends]With
Just sprinkling some tests. These covered a wee little bit of missing usecases.
Optimizations in startsWith
* Consolidate implementation by checking length in a single spot.
* Checks narrow string or the same types' lengths.
* Index iterates on all RA ranges (and not just Arrays).

Ends with was left untouched, because it forwards to startsWith anyways.
Optimization in startsWith(Range, Needles...)
Basically, makes it stop searching as soon as an element as matched.

This is an important optimization, that avoids a lot of startsWith's other "non-optimzations"...
support for non RA with length in startWith

As suggested by Andrei.

Also: More unittests
Merge pull request #1035 from monarchdodra/startWith

Maintenance in [starts|ends]With