Bringing iterator support to StringRef is probably worth discussing, but it seems orthogonal to this CL.<br><br>What might be worth doing now is adding StringRef::find_if and then having these functions use that.<br><br>This could then be used to implement such operations as split_if() (perhaps in a different CL though).  Thoughts?<br><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 22, 2016 at 10:11 PM Sanjoy Das <<a href="mailto:sanjoy@playingwithpointers.com">sanjoy@playingwithpointers.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">sanjoy added a subscriber: sanjoy.<br class="gmail_msg">
sanjoy added a comment.<br class="gmail_msg">
<br class="gmail_msg">
Have you considered adding `StringRef(iterator, iterator)` constructor, and replacing the explicit loops with `std::find_if` and `std::find_if_not`.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D24842" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D24842</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>