[PATCH] D23965: Add StringRef::keep_front() and StringRef::keep_back()

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 27 20:44:20 PDT 2016


zturner added a comment.

In https://reviews.llvm.org/D23965#527296, @majnemer wrote:

> Sounds like a useful API.  The term I've heard of in other programing languages is "take", I think `take_front` and `take_back` might be a little nicer.


`take_front` sounds ok, but `take_back` sounds awkward to me.  I almost want to say "take what back?"  If the convention was `drop` and `rdrop`, then `take` and `rtake` would sound good, but I'm not crazy about `take_front` and `take_back`.  I could probably be convinced though if the majority prefers it.


https://reviews.llvm.org/D23965





More information about the llvm-commits mailing list