[llvm-commits] [llvm] r148791 - /llvm/trunk/include/llvm/ADT/StringRef.h
Chris Lattner
sabre at nondot.org
Tue Jan 24 05:35:19 PST 2012
On Jan 24, 2012, at 1:10 AM, Chandler Carruth wrote:
> On Tue, Jan 24, 2012 at 12:58 AM, Chris Lattner <sabre at nondot.org> wrote:
> Author: lattner
> Date: Tue Jan 24 02:58:57 2012
> New Revision: 148791
>
> URL: http://llvm.org/viewvc/llvm-project?rev=148791&view=rev
> Log:
> add ::drop_back() and ::drop_front() methods, which are like pop_front/pop_back on a vector, but a) aren't destructive to "this", and b) can take a # elements to drop.
>
> FWIW, the string_ref proposal for standardization provides pop_front and pop_back with an N that is the number of elements to pop... Would it be worth following that lead, and just copying the string ref before calling them? I'm particularly interested in the use case for returning the adjusted string in case we should add these methods to the standards proposal.
I'd be fine with adding that as well if people would find it useful.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120124/067ca2d9/attachment.html>
More information about the llvm-commits
mailing list