mozilla/rust — pull request #9924 by metajack (2013-10-18 05:33:49+00:00)
Title: Fix starts_with() and ends_with().

d4a32386f3b6 broke these since slice_to() and slice_from() must get character
boundaries, and arbitrary needle lengths don't necessarily map to character
boundaries of the haystack.

This also adds new tests that would have caught this bug.