[llvm-commits] [PATCH][Support/StringRef] Add rtrim.

Michael Spencer bigcheesegs at gmail.com
Thu May 10 12:20:32 PDT 2012


On Thu, May 10, 2012 at 12:07 AM, Benjamin Kramer
<benny.kra at googlemail.com> wrote:
> On 10.05.2012, at 01:37, Michael Spencer <bigcheesegs at gmail.com> wrote:
>
>> I need rtrim (right trim) for the YAML parser.
>>
>> An alternative implementation would be to add rfind_first_not_of and
>> then implement in terms of that.
>
> Don't we already have StringRef::find_last_not_of?
>
> -Ben

No. Would you rather see that added? Or rtrim implemented in terms of it?

- Michael Spencer

>>
>> Patch attached.
>>
>> - Michael Spencer
>> <rtrim.patch>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list