Add startsWith, endsWith, removePrefix, removeSuffix to folly::Range
authorTudor Bosman <tudorb@fb.com>
Thu, 19 Dec 2013 16:31:40 +0000 (08:31 -0800)
committerJordan DeLong <jdelong@fb.com>
Fri, 20 Dec 2013 21:07:41 +0000 (13:07 -0800)
commitc84a6adfa129a50fc4d16df8a290a613ed548e82
treef7c0b8ef2c3638d2288a3d15404271b822c6b228
parent1ceb5edc1e7383f928252f88c2ab45e3662e9978
Add startsWith, endsWith, removePrefix, removeSuffix to folly::Range

Summary:
Yes, I know about boost::starts_with, but I think the convenience is worth it.
Also, I've written then equivalent of removePrefix / removeSuffix way too
many times.

Test Plan: test added

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D1106425
folly/Range.h
folly/test/RangeTest.cpp