[PATCH] D25299: Add StringRef::find_lower and contains_lower

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 17:37:28 PDT 2016


zturner created this revision.
zturner added a reviewer: chandlerc.
zturner added a subscriber: llvm-commits.

These are replacements for the standard C api `strcasestr()`.

I chose to implement this by allocating two copies on the heap and then using existing code.  But I could also implement this using an `M*N` loop if you think that's preferable.  Neither way is ideal, but there isn't exactly a fast way to implement this.


https://reviews.llvm.org/D25299

Files:
  include/llvm/ADT/StringRef.h
  lib/Support/StringRef.cpp
  unittests/ADT/StringRefTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25299.73714.patch
Type: text/x-patch
Size: 4837 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161006/8cadd612/attachment.bin>


More information about the llvm-commits mailing list